Third Fastest Marathon Time
Problem
A race organiser stores each runner's finishing time in whole minutes.
Table: `race_finishes`
| Column | Type |
|---------------|------|
| runner_id | int |
| finish_minutes| int |
`runner_id` is the primary key. Faster runners have a **smaller** `finish_minutes`.
Write a query that reports the **3rd fastest distinct** finishing time, aliased as `third_fastest`. (The 3rd fastest is the 3rd smallest distinct value.)
Tables
Example rows — the live problem includes the full dataset.
| runner_id | finish_minutes |
|---|---|
| 1 | 188 |
| 2 | 195 |
| 3 | 210 |
Expected output
Your answer should return 1 row with the columns third_fastest.
Starter code (SQL)
SELECT *
FROM race_finishes;Solve this SQL question free
Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock