MS SQL SERVER - DEPARTMENT WISE SALARY WITHOUT USING GROUP BY : 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)

EXPECTED OUTPUT:
DeptName   Salary
 A	       400
 B	       140
