Introduction
Quiz
5. Question 3
The End

Instruction

Well done! How about Question 3?

Exercise

Find the average distance driven for the following grouping combinations:

  1. Year, Month, and Day
  2. Country and CarSize

Show the following columns in the query result: Year, Month, Day, Country, CarSize, and AvgDistance.

Stuck? Here's a hint!

The best way to go about this query is to use:

GROUP BY GROUPING SETS 
(
  (A, B, C),
  (A, B)
)