SELECT warehouse, SUM(quantity) qty FROM inventory GROUP BY warehouse; +---------------+-----+ | warehouse | qty | +---------------+-----+ | San Fransisco | 560 | | San Jose | 650 | +---------------+-----+ 2 rows in set