#28

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.

namedatacenter_idspare_capacity
US West4400
Asia3400
Australia6200
Microsoft

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid