GROUPING SETS ( GROUP BY GROUPING SETS (<groupsets>) )
GROUP BY GROUPING SETS is an advanced extension of the GROUP BY clause that allows multiple groupings within a single statement. Each grouping set is a set of dimension columns.
ROLLUP ( GROUP BY ROLLUP <groupRollup> )
GROUP BY ROLLUP is an extension of the GROUP BY clause that produces sub-total rows (in addition to the grouped rows). Sub-total rows are rows that further aggregate whose values are derived by computing the same aggregate functions that were used to produce the grouped rows.
CUBE (GROUP BY CUBE <groupCube>)
GROUP BY CUBE is an extension of the GROUP BY clause similar to GROUP BY ROLLUP. In addition to producing all the rows of a GROUP BY ROLLUP, GROUP BY CUBE adds all the “cross-tabulations” rows. Sub-total rows are rows that further aggregate whose values are derived by computing the same aggregate functions that were used to produce the grouped rows.
EXCEPT ( <column> )
SELECT * EXCEPT columns that should be excluded from the results
EXCEPT SET OPERATOR
Eliminates rows from the result set of one query that are present in the result set of another query, while also removing duplicates.
Last modified on October 1, 2026