viewing paste Unknown #261 | 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'),
  (SELECT SUM(amount) FROM `table` WHERE `player_name`=pname && `damage_type`='Damage')
FROM `table`
Viewed 998 times, submitted by Guest.