Best April deals - hours only!Up to 80% off on all courses and bundles.-Close
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 car_size

Show the following columns in the query result: year, month, day, country, car_size, and avg_distance.

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)
)