Explain it in 60 seconds
ROLLUP, CUBE and GROUPING SETS
Data Analyst · SQL for Analytics · Intermediate
What do ROLLUP, CUBE and GROUPING SETS do?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Multiple grouping levels in one query.
- ROLLUP: hierarchical subtotals and grand total.
- CUBE: all combinations.
- GROUPING SETS: chosen combinations.
- GROUPING() identifies subtotal rows.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.