Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Dealing with dates
Working with time
15. Sorting by TIME columns
Date and time data types in PostgreSQL
Extracting dates and times
Timezone conversion
Format date and time
Current date and time data
Summary

Instruction

Good! You can also sort results by time:

SELECT
  code,
  arrival_time
FROM route
ORDER BY arrival_time DESC;

Have you noticed that time and date data work very similarly?

Exercise

Show the code and arrival_time of all routes that arrive before 4:00 PM. Order them by arrival time, with the earliest time first.