playground explore freely · no grades
SQL Playground
Explore any Runtime dataset with SQL. Nothing here affects course progress.
Every domestic flight flown by a sample of 435 aircraft in January–March 2025: schedules, delays, cancellations, diversions and delay causes.
130,330 rows6 tables2025-01 – 2025-03
tables
Open a table to see what one row means, its columns and keys, and a preview. Start from flights: it is the dataset's central table.
airlines14 rows · 3 columns
One airline.
- airline_code
Airline code
- airline_name
Airline name
- carrier_group
network, low-cost, ultra-low-cost, or regional
airports326 rows · 8 columns
One airport that appears in this dataset.
- airport_code
Airport code (for example JFK)
- airport_name
Airport name
- city
City
- state
Two-letter state or territory code
- state_name
State or territory name
- latitude
Latitude
- longitude
Longitude
- elevation_ft
Elevation in feet
routes5,436 rows · 4 columns
One flight path from an origin airport to a destination airport.
- route_id
Route key
- origin
Departure airport
- destination
Arrival airport
- distance_miles
Distance between the airports in miles
calendar90 rows · 10 columns
One calendar date in the first quarter of 2025.
- date
Calendar date (YYYY-MM-DD)
- year
Year
- quarter
Quarter number
- month
Month number
- month_name
Month name
- day_of_month
Day of month
- day_of_week
0 = Sunday … 6 = Saturday
- day_name
Day name
- is_weekend
1 on Saturday and Sunday
- holiday_name
U.S. federal holiday, NULL otherwise
cancellation_reasons4 rows · 2 columns
One reason a flight can be cancelled (for example weather or carrier).
- code
A, B, C or D
- description
Reason description
flights124,460 rows · 25 columns
One scheduled domestic flight, including cancelled and diverted flights.
- flight_id
Flight key
- flight_date
Scheduled departure date
- airline_code
Airline that operated the flight
- flight_number
Flight number; repeats across days
- tail_number
Aircraft ID; NULL when not reported
- origin
Departure airport
- destination
Arrival airport
- route_id
Route for this origin and destination
- scheduled_departure
Scheduled departure time at the origin
- actual_departure
Actual departure time; NULL if cancelled
- departure_delay
Minutes late leaving (negative = early); NULL if cancelled
- taxi_out_minutes
Minutes from leaving the gate to takeoff
- scheduled_arrival
Scheduled arrival time at the destination
- actual_arrival
Actual arrival time; NULL if cancelled or diverted
- arrival_delay
Minutes late arriving (negative = early); NULL if cancelled or diverted
- air_time_minutes
Minutes in the air
- distance_miles
Route distance in miles
- cancelled
1 if the flight was cancelled
- cancellation_code
Why it was cancelled
- diverted
1 if the flight landed somewhere other than its destination
- carrier_delay
Minutes of delay blamed on the airline (only when arrival delay is 15+ minutes)
- weather_delay
Minutes of delay blamed on weather
- nas_delay
Minutes of delay blamed on air traffic control
- security_delay
Minutes of delay blamed on security
- late_aircraft_delay
Minutes of delay from a late incoming aircraft
relationships
How to join these tables. Left column matches the right column.
- routes.origin joins to airports.airport_code
- routes.destination joins to airports.airport_code
- flights.airline_code joins to airlines.airline_code
- flights.origin joins to airports.airport_code
- flights.destination joins to airports.airport_code
- flights.route_id joins to routes.route_id
- flights.flight_date joins to calendar.date
- flights.cancellation_code joins to cancellation_reasons.code