Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
3. The aircraft table
Dealing with dates
Working with time
Date and time data types in PostgreSQL
Extracting dates and times
Timezone conversion
Format date and time
Current date and time data


Good! Let's see some data about the aircraft.


Select all information from the aircraft table. PerfectAir has its own fleet, and each aircraft is listed in this table. It contains the following columns:

  • id – an internal ID for the aircraft.
  • model – the aircraft's make and model.
  • produced_date – the date when production on that aircraft was completed.
  • registration_timestamp – the date and time when that aircraft was registered.
  • launched_timestamp – the date of that aircraft's first PerfectAir flight.
  • withdrawn_timestamp – the date when that aircraft finished its last PerfectAir flight.

Note that the produced_date and launched_timestamp dates may differ significantly (e.g., if PerfectAir bought a used aircraft).

You may have noticed that launched_timestamp is a more accurate column – it shows both the date and the moment. This is because PerfectAir wants to mark the exact moment of the aircraft's first takeoff.