RienSQL
TASK #230 · Medium · Amadeus

Average Departure Delay per Airline

Your brief
In the flights table scheduled_departure is the scheduled departure time and actual_departure is the actual one. The delay of a flight is the difference between them in minutes; if the flight left earlier than scheduled, its delay is 0.

Write a query that for every airline returns airline_name and the average delay avg_delay_min of its operated flights (status = 'Departed'), rounded to two decimals.
Expected columnsairline_name avg_delay_minAmadeus
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
airlinesairline_code, airline_name, country
flightsflight_id, flight_number, airline_code, origin, destination, scheduled_departure, actual_departure, status
bookingsbooking_id, flight_id, booking_date, price, status