
242 8.4 Combining Groupings Together
group level for a particular row returned. In other words, the
GROUPING_ID function can be used to tell your query where in a ROL-
LUP or CUBE aggregation the current row is.
Note: In Oracle Database 10g Release 2 it is mandatory for materialized views
containing GROUP BY clause extensions, to contain the GROUPING_ID
function executed on all columns in the GROUP BY clause extension
ROLLUP, CUBE, or GROUPING SETS clause. Without the appropriate
GROUPING_ID functionality, the DBMS_MVIEW.EXPLAIN_ REWRITE
procedure will produce an error: (QSM-01295: no suitable grouping_id found
in materialized view with grouping sets). ...