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 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:
MySQL
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment