Your question is SQL Running Totals. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Pratt & Whitney analysts need to monitor completed inspection effort across engine programs. Write a PostgreSQL query that summarizes inspection hours by engine model and calendar month, then calculates a chronological running total for each model.
status = 'Completed' and a non-null completion date.| Column | Type | Description |
|---|---|---|
| program_idPK | INT | Unique engine program identifier |
| engine_model | VARCHAR(40) | Pratt & Whitney engine model name |
| aircraft_platform | VARCHAR(60) | Primary aircraft platform using the engine |
| Column | Type | Description |
|---|---|---|
| work_order_idPK | INT | Unique work order identifier |
| program_id | INT | Engine program identifier from the operational work-order feed |
| completed_at | DATE | Date the work order was completed |
| status | VARCHAR(20) | Current work order status |
| inspection_hours | NUMERIC(8,2) | Hours recorded for the inspection |