Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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
Author
Message
Posted Tuesday, September 24, 2013 9:14 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, April 13, 2016 4:43 PM
Points: 306, Visits: 257

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