Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT SUM(itm.item_cash_staked - itm.item_cash_won)
- FROM item itm
- WHERE itm.item_rejection_code_id IS null
- AND itm.item_created_on > '2019-08-01 17:38:33.613+01'
- AND EXISTS (select *
- from product p
- where p.product_id = itm.product_id
- and p.customer_id = 123456)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement