Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
16. Exercise 1


In this quiz, we're going to use a table named FruitHarvest. It has the following columns:

  • Id – The ID of the harvest
  • Site – The ID of the harvest site
  • Year – The year of the harvest
  • Weather – Either Fair or Poor. There are two harvests yearly, one in the high season (fair weather) and another in the low season (poor weather)
  • Amount – The amount of fruit harvested

All right, let's take a look at the first question.


Show the average amount of fruit harvested for the following grouping sets:

  1. Site and Year
  2. Weather

Show the following columns in the query result: Site, Year, Weather, and AvgAmount. Replace all NULLs in the Site and Weather columns with the word ALL.