Skip to main content

aggregate_functions

∑ Use Aggregate Functions

Aggregate functions let you summarize data. Common ones include COUNT, SUM, AVG, MIN, and MAX:

-- Count total users
SELECT COUNT(*) FROM users;

-- Average user ID
SELECT AVG(id) FROM users;