Home Forums SQL Server 2005 SQL Server 2005 General Discussion How to Write Query for the Below Requirement? RE: How to Write Query for the Below Requirement?
sribe
SSC-Addicted
Points: 421
More actions
September 24, 2013 at 9:14 am
#1652799
select party_code,sum(inst_amt) as Total_instamt,
sum(case when paid_date < '27/11/2012' then paid_amt else 0 end) as Total_Paidamt
from @table1
group by party_code