SQL LEARNING PLATFORM
Turning millions of rows into a single meaningful number.
Learning Blocks
Interactive Queries
Concepts you'll master
COUNT — how many rows (with and without NULLs)
SUM, AVG — totals and averages
MIN, MAX — extremes
Combining multiple aggregates
🌟 Think of it this way: Aggregate functions are like a cashier totalling your bill. You bring 20 items (rows) to the counter; they give you back one number (the total). The individual items are collapsed into a single summary.
SELECT COUNT(*) AS total_employees FROM employees;
SELECT COUNT(*) AS all_rows,
COUNT(manager_id) AS has_manager
FROM employees;SELECT
COUNT(*) AS headcount,
SUM(salary) AS total_payroll,
AVG(salary) AS avg_salary,
MIN(salary) AS min_salary,
MAX(salary)
FROM employees;Practice your SQL skills