MulaiMulai sekarang secara gratis

Building the base report

Now, build the base report for this visualization:

This should be built by querying the summer_games table, found in the explorer on the bottom right.

Latihan ini adalah bagian dari kursus

Reporting in SQL

Lihat Kursus

Petunjuk latihan

  • Using the console on the right, select the sport field from the summer_games table.
  • Create athletes by counting the distinct occurrences of athlete_id.
  • Group by the sport field.
  • Make the report only show 3 rows, with the highest athletes at the top.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

-- Query the sport and distinct number of athletes
SELECT 
	____, 
    ____ AS athletes
FROM summer_games
GROUP BY ____
-- Only include the 3 sports with the most athletes
ORDER BY ____
LIMIT ____;
Edit dan Jalankan Kode