Instruction
Great! It’s time to wrap things up.
GROUP BY CUBE ()creates all possible grouping combinations with the columns inside its parentheses.- The order of columns within the parentheses of
CUBEdoesn't matter. - You can use
GROUPING_ID()with the same columns as those in theGROUP BY CUBE ()clause to get grouping levelIDs. - You can leave some columns outside
CUBE. Such columns will always be used for grouping. - You can use additional pairs of parentheses inside
CUBEto indicate that certain columns should be treated as a single column by theCUBEclause. - You can use
COALESCE()to replaceNULLvalues with something more meaningful.
How about a short quiz now?
Exercise
Click to continue.



