viewing paste gogo z3r0 | MySQL

Posted on the
1 2 3 4 5
SELECT DISTINCT
  (SELECT `player_name`) as pname,
  (SELECT SUM(amount) FROM `table` WHERE `player_name`=pname && `damage_type`='Heal') as heal,
  (SELECT SUM(amount) FROM `table` WHERE `player_name`=pname && `damage_type`='Damage') as damage
FROM `table`
Viewed 858 times, submitted by Guest.