Your question is Aggregate by Category. Start with the requirements and the one table 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.
Airbus Helicopters uses Skywise maintenance data to monitor completed maintenance activity and associated repair costs. Write a PostgreSQL query that summarizes completed maintenance events by component category.
component_category with the number of completed events and the total repair cost.| Column | Type | Description |
|---|---|---|
| event_idPK | INTEGER | Unique maintenance event identifier |
| component_category | VARCHAR(40) | Maintained helicopter component category |
| status | VARCHAR(20) | Current maintenance event status |
| repair_cost | NUMERIC(12,2) | Repair cost in euros, which may be missing |