Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Consulta MySQL - Soma a capacidade de vários armazéns

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