[SQL문제풀기] Largest Olympics

silver's avatar
Jan 30, 2026
[SQL문제풀기] Largest Olympics

문제

내가 작성한 정답

MySQL

select games,count(distinct id) num from olympics_athletes_events group by games,season, year order by num desc limit 1;

PostgreSQL

select games,count(distinct id) num from olympics_athletes_events group by games,season, year order by num desc limit 1; select games,count(distinct id) num from olympics_athletes_events group by games,season, year order by num desc fetch first 1 row only;

Oracle

select games,count(distinct id) num from olympics_athletes_events group by games,season, year order by num desc fetch first 1 row only; select games, num from (select games,count(distinct id) num from olympics_athletes_events group by games,season, year order by num desc) where rownum =1;
Share article

silver