Practice · Sports · Medium

Who has the most titles?

From sports_titles, return holder and titles for every holder with more than 5 titles, most titles first.

Runs in your browser. No signup needed.

What you are given

sports_titles(holder, competition, titles). (One row is a medal count, not titles — the KB notes that.)

Starting point

SELECT holder, titles
FROM sports_titles
WHERE titles > 5
ORDER BY titles DESC;

The reference solution is checked automatically when you run your query on the practice page — results are compared row by row, and order matters for this one.

Did you know

Al Ahly’s 12 CAF Champions Leagues are an African record, and it was named CAF African Club of the Century in 2000. (CAF)

More Sports challenges

Open it in the playground →