today:
590
yesterday:
719
Total:
1,770,374

Technology

GROUP BY (for CHART)

admin 2020.10.06 09:53 Views : 116

Select SUPPORTER.ORG,SUM(CONTRIBUTION.AMOUNT), 

CASE SUPPORTER.ORG 

WHEN '1' THEN '단체'

WHEN '2' THEN '개인'

ELSE 'N/A' END

from CONTRIBUTION

INNER JOIN SUPPORTER

ON CONTRIBUTION.SUPPORTER_ID = SUPPORTER.SID

WHERE to_number(to_char(CONTRIBUTION_DATE,'YYYY')) = 2019

GROUP BY SUPPORTER.ORG

ORDER BY SUPPORTER.ORG