Color theme
0 day streak0 XPP1
SQLLearn mode
MISSION 1 OF 1

Rank the race finalists

0 XP earned
SQL track: BeginnerMission: IntermediateMulti-column sortingTie breakingResult limits
Before you start this beginner track

Tables, rows, and columns. Start with SELECT before grouped queries.

Guided code reading and debugging. Runnable coding challenges are available in JavaScript, Python, and SQL.

x
0 / 2 challenges
LEARN THE CONCEPT

Understand it, then try it.

A race report must show the two fastest runners and resolve tied times consistently. ORDER BY can compare multiple columns: it uses the second only when the first is tied. ASC puts smaller times first and names in ascending text order. LIMIT then keeps the first two rows of that ordered result.

quest.sql
WITH laps(runner, seconds) AS (    VALUES ('Mina', 54), ('Otis', 49),           ('Luz', 49), ('Bea', 61))SELECT runner, secondsFROM lapsORDER BY seconds ASC, runner ASCLIMIT 2;

Run each query independently in SQLite 3. VALUES inside a common table expression supplies all data, so no tables or database setup are needed. Quiz outputs show data rows only, with | between columns and no headers.

Track the values line by line. Predict the result before running this example in your own editor.