Delta Air Lines wants to identify routes with the highest average arrival delays during the last completed quarter. Assume the reporting period is April 1, 2025 through June 30, 2025. Write a PostgreSQL query that ranks routes by their average arrival delay.
Requirements
- Join flight records to Delta's route reference table.
- Include only flights within the reporting period and exclude cancelled flights.
- Calculate the average non-null arrival delay in minutes for each route, rounded to two decimal places.
- Return the top three routes, breaking ties by
route_code alphabetically.