Part 51: Aggregate Functions: COUNT, SUM, AVG, MIN & MAX

Part 51 Technology Updated September 12, 2026

Part 51: Aggregate Functions: COUNT, SUM, AVG, MIN & MAX

Aggregate functions calculate a single summary result from multiple rows.


1. Core Functions

SELECT 
  COUNT(*) AS total_employees,
  SUM(salary) AS total_payroll,
  AVG(salary) AS average_salary,
  MIN(salary) AS lowest_salary,
  MAX(salary) AS highest_salary
FROM employees;

Key Takeaways

  • Aggregate functions ignore NULL values (except for COUNT(*)).

In Part 52, we explore Understanding COUNT(*) vs COUNT(column) vs COUNT(DISTINCT)!