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 total_price (rename the column to avg_price), and two new columns (S and C) denoting whether the columns supplier or category are used in the grouping (0 if used, 1 otherwise).