RienSQL
TASK #231 · Medium · Amadeus

Daily 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:
  • 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.
Sort by flight_date and then by airline_code.
Expected columnsflight_date airline_code total_flights cancellation_rateAmadeus
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