Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
3. Question 1
The End


Okay, let's start with something easy.


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 AvgDistance.

Stuck? Here's a hint!

A natural candidate for this query is:

GROUP BY ROLLUP(Year, Month, Day)