Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- Customerid,
- sum(case when vouchartype = 'C' THEN -amount ELSE amount END) As AMount
- FROM YOurTable
- GROUP BY Customerid
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement