SELECT groupfield, SUM(somedata) FROM tablename GROUP BY groupfield