SQL · Pattern 4 — Aggregation
SUM
SUM() adds up a numeric column across all matching rows, collapsing them into a single value.
Source data — Pattern 4: Aggregation
All queries run against the shared employees table (see schema.sql) — no new columns needed for this pattern.

What it does
SUM() adds up a numeric column across all matching rows, collapsing them into a single value. Rows with NULL in that column are silently skipped, not treated as zero.
Problem
Find the total salary paid.
SELECT SUM(salary) AS total_salary
FROM employees;
Result
