• 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