Instruction
Well done! Another thing you may be wondering about is whether you need to include all grouping columns inside the ROLLUP parentheses. No, you don't! You can leave some columns outside ROLLUP:
SELECT GROUPING_ID(FullName, Category, Week) AS GroupingId, FullName, Category, Week, AVG(Score) AS AvgPrice FROM ContestScore GROUP BY ROLLUP (FullName, Category), Week;
In the query above, all rows will be grouped by columns not included in ROLLUP. This means that the following grouping levels will be applied:
GROUP BY FullName, Category, WeekGROUP BY FullName, WeekGROUP BY Week
Exercise
Run the template query and see what happens.



