Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
GROUP BY – Recap
ROLLUP
Summary

Instruction

Good job! You know the drill. It's your turn to write a similar query.

Exercise

Show how much was spent, on average: for each Supplier, in each Category, for each Supplier in general; and in general among all suppliers and categories.

Show the following columns: Supplier, Category, the average TotalPrice (rename the column to AvgPrice), and two new columns (S and C) denoting whether the columns Supplier or Category are used in the grouping (0 if used, 1 otherwise).