SELECT warehouse, product, SUM(quantity) FROM inventory GROUP BY warehouse, product;