SQL aggregate functions
19 March 2023 (Updated 27 April 2025)
On this page
In a nutshell
An aggregate function performs a calculation on multiple values and returns a single value.
For example, assuming you have the following salaries
table:

You can calculate the sum of all salaries.salary
values for all records with:
select sum(salary) from salaries;
Examples of aggregate functions
Sources
Tagged:
SQL
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment