Spare datacenter capacity
The Microsoft Azure team is evaluating unused datacenter capacity. For each datacenter, calculate spare capacity as monthly_capacity − demand. If demand data is missing, treat demand as 0. Return datacenter_id, name, and spare_capacity. Sort the result by spare_capacity in descending order.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.
| name | datacenter_id | spare_capacity |
|---|---|---|
| US West | 4 | 400 |
| Asia | 3 | 400 |
| Australia | 6 | 200 |
Microsoft
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid