What does "GROUPING SETS", "CUBE", and "ROLLUP" extend GROUP BY to do?
Correct! Well done.
Incorrect.
The correct answer is B) They allow computing multiple levels of aggregation in a single query — GROUPING SETS specifies arbitrary combinations of grouping columns, ROLLUP produces hierarchical subtotals, and CUBE produces all possible combinations (a full cross-tabulation)
Correct Answer
They allow computing multiple levels of aggregation in a single query — GROUPING SETS specifies arbitrary combinations of grouping columns, ROLLUP produces hierarchical subtotals, and CUBE produces all possible combinations (a full cross-tabulation)
These GROUP BY extensions generate multiple grouping levels in one pass: ROLLUP produces hierarchical subtotals (e.g. by day, then by month, then grand total), CUBE produces every combination of the specified columns, and GROUPING SETS lets you specify exactly which combinations you want.