title: Department wise salary without using GROUP BY
body: <p>I need to get the desired output without using GROUP BY Clause</p>
  
  <pre><code>CREATE TABLE #Dept
  (
      DeptName VARCHAR(30),
      Salary INT
  )
  
  INSERT INTO #Dept VALUES ('A',100),('A',90),('A',80),('A',70),('A',60),('B',80),('B',20),('B',40)
  </code></pre>
  
  <p>Expected Output:</p>
  
  <pre><code>DeptName   Salary
   A         400
   B         140
  </code></pre>