select w.location, w.warehouse_id, sum(c.capacity) as total_capacity
from warehouse w, crate c
where w.warehouse_id = c.warehouse_id
group by c.warehouse_id
select w.location, w.warehouse_id, sum(c.capacity) as total_capacity
from warehouse w, crate c
where w.warehouse_id = c.warehouse_id
group by c.warehouse_id