Friends..
I am not able to minus total from demand...
Please correct me where i am making wrong in the below query..
select
demand=case
when a.graduatetype='F' then (count(s.rollnumber)*12500)
else 0
end,
TotalPaid=sum(sd.PRD_AMOUNT),(demand-totalpaid) as balance
from xxx,xxxxx,xxxx
thanks