SELECT foo, SUM(bar) FROM xyzzy GROUP BY foo