Write a SQL query to calculate weekly repair turnaround time by store, including average turnaround and total completed repairs at uBreakiFix by Asurion.
Use the provided store and repair records. Include only completed repairs with valid receipt and completion timestamps.
store_id, store_name, week_start, average_turnaround_hours, and total_completed_repairs.store_id, then week_start ascending.| Column | Type | Description |
|---|---|---|
| store_idPK | INT | Unique uBreakiFix by Asurion store identifier |
| store_code | VARCHAR(20) | Store's operational code |
| store_name | VARCHAR(100) | Store display name |
| Column | Type | Description |
|---|---|---|
| repair_idPK | INT | Unique repair identifier |
| store_id | INT | Store that handled the repair |
| received_at | TIMESTAMP | Timestamp when the repair was received |
| completed_at | TIMESTAMP | Timestamp when the repair was completed |
| status | VARCHAR(20) | Current repair status |