COUNT
SUM
AVG
Returns the sum.
SUM(expr)
Enter values below to update the example in real time.
department_id
salary
total_salary
employees
SELECT department_id, SUM(salary) AS total_salary FROM employees GROUP BY department_id;