Guest User

Untitled

a guest
Nov 16th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. 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
  2. (savedate<='2069/03/32')
  3. and (39=39) or ncr>0
  4. and memberid in (select memberid from savingdetail where
  5. (savedate<='2069/03/32') group by memberid having sum(cr)>0)
  6. group by serviceid order by serviceid
Add Comment
Please, Sign In to add comment