Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Quiz
3. Question 1
The End

Instruction

Okay, let's start with something easy.

Exercise

Show the average distance driven for the following grouping combinations:

  1. year, month, and day
  2. year and month
  3. year
  4. None (general average)

In the query result, show the following columns: year, month, day, and avg_distance.

Stuck? Here's a hint!

A natural candidate for this query is:

GROUP BY ROLLUP(year, month, day)