Grouping
4 / 12
EasyOutput prediction

GROUP BY multiple columns

Given this table (orders):

idcustomerstatus
1Aliceshipped
2Aliceshipped
3Alicepending
4Bobpending

How many rows does this query return?

SELECT customer, status, COUNT(*) FROM orders GROUP BY customer, status;

← → arrow keys to navigate

Sign in to save your progress.

GROUP BY multiple columns - SQL Grouping Quiz | Unnested