Walmart's supply chain team wants to identify distribution centers with the highest average shipment delays during the previous calendar quarter. Write a SQL query that calculates the average recorded delay for each eligible distribution center and returns the three centers with the highest averages.
distribution_center_id, center_code, center_name, and average_delay_minutesNULLdistribution_center_id| Column | Type | Description |
|---|---|---|
| distribution_center_idPK | INT | Unique distribution center identifier |
| center_code | VARCHAR(20) | Operational distribution center code |
| center_name | VARCHAR(100) | Distribution center name |
| Column | Type | Description |
|---|---|---|
| shipment_idPK | INT | Unique shipment identifier |
| distribution_center_id | INT | Distribution center handling the shipment |
| shipment_date | DATE | Shipment processing date |
| delay_minutes | DECIMAL(10,2) | Shipment delay in minutes, nullable when not recorded |