Codington
0 of 8 problems solved • 0%

Exercise prompt

Break a Tie at the Cutoff

Three runs started at the same time, but the report has room for only two. Add a second column to ORDER BY to decide which tied rows come first. Each sort column has its own direction.

Example

SELECT id, service FROM deployments ORDER BY service ASC, id ASC;

Your task

Return id and started_at for the two earliest deployments. For equal start times, put the higher ID first.

Opening the database…