Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select count(distinct memberid)memberCount,sum(savingdetail.dr)withdraw,sum(savingdetail.cr)+sum(isnull(savingdetail.ncr,0))Collection,sum(savingdetail.cr)interest,sum(savingdetail.cr-savingdetail.dr)+sum(isnull(savingdetail.ncr,0)-isnull(savingdetail.ndr,0))balance from savingdetail where (ndr is NULL or ndr=0) and
- (savedate<='2069/03/32')
- and (39=39) or ncr>0
- and memberid in (select memberid from savingdetail where
- (savedate<='2069/03/32') group by memberid having sum(cr)>0)
- group by serviceid order by serviceid
Add Comment
Please, Sign In to add comment