Suggest an editImprove this articleRefine the answer for “What does SUM() do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)`SUM()` is an aggregate function that **totals the values** in a numeric column: it adds up all the non-empty (`NOT NULL`) values and returns one total, e.g. `SELECT SUM(salary) FROM employees` returns the total of all salaries. **Key point:** combined with `GROUP BY`, you can total by category, e.g. the sum of salaries in each department.Shown above the full answer for quick recall.Answer (EN)Image`SUM()` is an aggregate function that **totals the values** in a numeric column. It adds up all the non-empty (`NOT NULL`) values and returns one total. ### Example ```sql SELECT SUM(salary) FROM employees; ``` Returns **the total** of every employee's salary. You can use it with `GROUP BY` to total by category: ```sql SELECT department, SUM(salary) FROM employees GROUP BY department; ``` Shows the salary total **in each department**.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.