SUM
일반적인 예
SELECT
SUM(point) as point
IF를 사용한 예
SELECT
SUM( IF(point > 0, point, 0)) as point
CASE 를 사용한 예
SELECT
SUM( CASE WHEN (item = \'deposit\') THEN point ELSE 0 END) as deposits,
SUM( CASE WHEN (item = \'withdrawal\') OR (item = \'fiat\') THEN point ELSE 0 END) as withdrawals'),