Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Dates
Time
14. Time with ORDER BY
Timestamps
Extract functions
Timezone conversion
Current date and time
Review

Instruction

Good! And the last thing, you can also sort by time.

SELECT
  code,
  departure
FROM route
ORDER BY arrival DESC;

Just like with dates again.

Exercise

Show the code and arrival time of all the routes with arrival before 4:00 PM and order them by arrival with the earliest time coming first.

Stuck? Here's a hint!

Remember the proper time format and use apostrophes: 'HH:MM:SS'. 4 PM is '16:00:00' in SQL.