构建基础报告
现在,请为下图构建基础报告:

该报告应通过查询右下角资源管理器中的 summer_games 表来完成。
本练习是课程的一部分
SQL 报表制作
练习说明
- 使用右侧控制台,从
summer_games表中选择sport字段。 - 通过统计
athlete_id的不同取值来创建athletes。 - 按
sport字段分组。 - 让报告仅显示 3 行,并将
athletes最高的排在最上方。
交互式实操练习
通过完成这段示例代码来试试这个练习。
-- 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 ____;