How can we calculate total salary by department?
GROUP BY with SUM() calculates the total numerical summation for each unique group.
Departmental budget tracking, regional revenue breakdowns, category spend.
SELECT department, SUM(salary) AS total_salary
FROM employees
GROUP BY department;Practice typing production-grade SQL code for GROUP BY with SUM.