Session Ready
Exercise

Countries with subqueries or CTEs

Of the Olympic regions, Africa has the warmest winters. However, some African countries do participate in the Winter Olympics. For instance, Morocco has sent more than 20 athletes over the years. Perhaps looking at the data at the regional level is too broad. Maybe some African countries have colder winters than other African countries.

Take another look at winter climate data, but look on a country level. The athletes have been filtered down to include only African athletes, with the first African Olympians competing in 1960.

Use both a subquery and CTE structure and compare the results.

Instructions 1/2
undefined XP
  • 1

    Use the country_code and athletes_wint table to write a subquery to limit results to African countries with athletes.

    • 2

      Use the same climate as in the subquery step to look at June temperatures and precipitation in a CTE.