Answer:
WITH deptsalary AS (
SELECT dept, SUM(salary)
FROM emp
GROUP BY dept)
SELCT *
FROM deptsalary
Step-by-step explanation:
deptsalary is temporary table.
dept and its respective sum of salary is to be displayed
8.8m questions
11.4m answers