Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase «««123

How to Write Query for the Below Requirement? Expand / Collapse
Posted Tuesday, September 24, 2013 9:14 AM


Group: General Forum Members
Last Login: 2 days ago @ 7:49 AM
Points: 199, Visits: 199

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
Post #1497938
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse