SQL: What is an aggregate function?
19 March 2023 (Updated 19 March 2023)
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
You can calculate the sum of all
salaries.salary values for all records with:
select sum(salary) from salaries;
Examples of aggregate functions