CUBE clauses. The GROUPING SETS clause allows you to remove
some of the subtotals from the result set, in much the same way that the
Figure 8.9
Sales revenues by
category.
Figure 8.10
Sales revenues by
region.
Figure 8.11
Sales revenues by
industry.
8.2
GROUP BY Clause Extensions227
Chapter 8
HAVING clause can be used to filter out aggregated groups from an
aggregated row set.
GROUPING SETS Clause Syntax
Figure 8.12 highlights the syntax of the GROUPING SETS clause. Note
how both ROLLUP and CUBE clauses can be subset ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.