Grouping
5 / 12
EasyOutput prediction

Distinct groups with multi-column GROUP BY

Given this table (sales):

idregionproduct
1EastWidget
2EastGadget
3WestWidget
4EastWidget

How many rows does this query return?

SELECT region, product, COUNT(*) FROM sales GROUP BY region, product;

← → arrow keys to navigate

Sign in to save your progress.

Distinct groups with multi-column GROUP BY - SQL Grouping Quiz | Unnested