Introduction
Summary
16. Exercise 1

Instruction

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.

Exercise

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.