hi, I am a layman in TD, and come across a Sum function issue.
sel
created_date (format 'YYYY/MM') (char(7)) as month
,count(*) as overall
,sum(table1. amount) as overall_amount
,sum(case when table1.amount > 300 then 1 else 0 end) as over_300_cnt
that's a part of my SQL,
and result come with 3 columns, but i want to get 4 columns, the 4th is the over_300_amt
how to use SUM function or other query?
thank u
Forums: