Write a SQL query to find the average response time of emergency vehicles grouped by district for Deccan International’s Fire and EMS decision-support use cases.
Use the incidents and vehicle_responses tables. Include completed Fire and EMS responses with known districts, and report response time in minutes.
district and avg_response_minutes.| Column | Type | Description |
|---|---|---|
| incident_idPK | INT | Unique emergency incident identifier |
| district | VARCHAR(50) | Operational district where the incident occurred |
| call_type | VARCHAR(20) | Incident category, such as Fire or EMS |
| Column | Type | Description |
|---|---|---|
| response_idPK | INT | Unique vehicle response identifier |
| incident_id | INT | Incident associated with the vehicle response |
| vehicle_type | VARCHAR(30) | Responding emergency vehicle type |
| dispatched_at | TIMESTAMP | Time the vehicle was dispatched |
| arrived_at | TIMESTAMP | Time the vehicle arrived at the incident |