SUM() in SQL — a practical guide to SQL SUM with clear examples you can reuse in real projects.
SQL Tutorial Series (35/100). Prefer one article? Read the complete SQL tutorial.
Short description
Useful for revenue and quantity totals.
Sum
SELECT SUM(total) AS revenue
FROM orders
WHERE status = 'paid';