LoslegenKostenlos loslegen

Report 4: Tallest athletes and % GDP by region

The final report on the dashboard is Report 4: Avg Tallest Athlete and % of world GDP by Region.

Report Details:

  • Column 1 should be region found in the countries table.
  • Column 2 should be avg_tallest, which averages the tallest athlete from each country within the region.
  • Column 3 should be perc_world_gdp, which represents what % of the world's GDP is attributed to the region.
  • Only winter_games should be included (no summer events).

Diese Übung ist Teil des Kurses

Reporting in SQL

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

SELECT 
	-- Pull in country_id and height
	____,
    ____,
    -- Number the height of each country's athletes
    ____ AS row_num
FROM ____ AS w
JOIN ____ AS a
ON ____
GROUP BY ____, ____
-- Order by country_id and then height in descending order
ORDER BY ____, ____ DESC;
Code bearbeiten und ausführen