COUNT() in SQL — a practical guide to SQL COUNT with clear examples you can reuse in real projects.
SQL Tutorial Series (34/100). Prefer one article? Read the complete SQL tutorial.
Short description
COUNT(*) counts rows; COUNT(col) ignores NULLs in that column.
Count
SELECT COUNT(*) AS orders_count
FROM orders
WHERE status = 'paid';