Was this helpful?
ROLLUP, CUBE, and GROUPING SETS
The following analytical SQL extensions to the GROUP BY clause are supported:
ROLLUP
CUBE
GROUPING SETS
GROUPING() function
These extensions simplify your SQL and improve the performance of aggregations in the data warehouse.
ROLLUP and CUBE produce subtotals and totals in a single query.
GROUPING SETS define levels of grouping in the GROUP BY without computing every level of the dimensions.
The GROUPING() function can be used with ROLLUP, CUBE, or GROUPING SETS syntax to express row filtering conditions more easily and to distinguish result rows generated by different groupings.
For more information, see the SQL Reference Guide.
Last modified date: 01/30/2023