Write a SQL query to find the average wash time for different service types.
Use the service_types and wash_sessions tables. Calculate duration in minutes only for completed sessions with both timestamps. Include every service type, including those with no qualifying sessions.
service_type_name, average_wash_minutes.service_type_id ascending.| Column | Type | Description |
|---|---|---|
| service_type_idPK | INT | Unique identifier for the wash service |
| service_type_name | VARCHAR(100) | Name of the Quick Quack wash service |
| Column | Type | Description |
|---|---|---|
| wash_session_idPK | INT | Unique identifier for the wash session |
| service_type_id | INT | Service performed during the session |
| vehicle_identifier | VARCHAR(20) | Internal vehicle reference |
| started_at | TIMESTAMP | Timestamp when washing started |
| completed_at | TIMESTAMP | Timestamp when washing completed |
| status | VARCHAR(20) | Session status |