TASK #231 · Medium · AmadeusDaily Cancellation Rate per Airline
Your brief
A flight in the flights table is cancelled if its
status = 'Cancelled'. The day of a flight is taken from its scheduled
departure scheduled_departure.
Write a query that, for flights from July 14 to July 16, 2025 inclusive, returns for every (day, airline) pair:
Write a query that, for flights from July 14 to July 16, 2025 inclusive, returns for every (day, airline) pair:
- flight_date — the date as text in the 'YYYY-MM-DD' format;
- airline_code — the airline code;
- total_flights — the number of flights;
- cancellation_rate — the percentage of cancelled flights, rounded to two decimals.
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
airlinesairline_code, airline_name, countryflightsflight_id, flight_number, airline_code, origin, destination, scheduled_departure, actual_departure, statusbookingsbooking_id, flight_id, booking_date, price, status