Tell me about a time you had to optimize a slow-running SQL query or data pipeline at Boeing, and what steps you took to improve performance.
Using the provided Boeing maintenance tables, write the optimized PostgreSQL query you would use to summarize qualifying aircraft work. Address how you would validate the performance improvement.
Output
- One row per qualifying aircraft, with
aircraft_id, aircraft_model, completed_work_orders, and total_labor_hours.
- Include completed work opened during 2025 with at least two work orders and associated maintenance events.
- Order by
total_labor_hours descending, then aircraft_id ascending.