GROUP BY
The GROUP BY statement groups rows that have the same values into summary rows. It is often used with aggregate functions.
SELECT category, COUNT(*)
FROM products
GROUP BY category;
Task:
Count how many orders exist for each status in the orders table.