Get all data about airports in order their codes
Write your request in the field below and click the "Check it!" button.
Use PostgreSQL syntax to write your answer. Descriptions of tables are provided at the bottom of the screen.
Get all data about airports in order their codes
Write your request in the field below and click the "Check it!" button.
Use PostgreSQL syntax to write your answer. Descriptions of tables are provided at the bottom of the screen.
The Bookings database (PostgreSQL) models airline flights across multiple airports and is widely used for SQL practice.
This page shows the table structure, key columns, and constraints used in typical analytical and transactional SQL queries.
The Bookings database contains 8 main tables.
ER diagram of the Bookings database
| aircraft_code | model | range | |
|---|---|---|---|
| 1 | 773 | {"en": "Boeing 777-300", "ru": "Боинг 777-300"} | 11100 |
| airport_code | airport_name | city | coordinates | timezone | |
|---|---|---|---|---|---|
| 1 | YKS | {"en": "Yakutsk Airport", "ru": "Якутск"} | {"en": "Yakutsk", "ru": "Якутск"} | (129.77099609375,62.0932998657227) | Asia/Yakutsk |
| ticket_no | flight_id | boarding_no | seat_no | |
|---|---|---|---|---|
| 1 | 0005435212351 | 30625 | 1 | 2D |
| book_ref | book_date | total_amount | |
|---|---|---|---|
| 1 | 00000F | 2017-07-05 00:12:00+00 | 265700.00 |
| flight_id | flight_no | scheduled_departure | scheduled_arrival | departure_airport | arrival_airport | status | aircraft_code | actual_departure | actual_arrival | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1185 | PG0134 | 2017-09-10 06:50:00+00 | 2017-09-10 11:55:00+00 | DME | BTK | Scheduled | 319 |
| aircraft_code | seat_no | fare_conditions | |
|---|---|---|---|
| 1 | 319 | 2A | Business |
| ticket_no | flight_id | fare_conditions | amount | |
|---|---|---|---|---|
| 1 | 0005432159776 | 30625 | Business | 42100.00 |
| ticket_no | book_ref | passenger_id | passenger_name | contact_data | |
|---|---|---|---|---|---|
| 1 | 0005432000987 | 06B046 | 8149 604011 | VALERIY TIKHONOV | {"phone": "+70127117011"} |