Let\'s say I have a hypothetical table like so that records when some player in some game scores a point:
name points ------------ bob 10 mike 03 mi
SELECT sum(points), name FROM `table` GROUP BY name
Or for the pivot
SELECT sum(if(name = 'mike',points,0)), sum(if(name = 'bob',points,0)) FROM `table