Advertisement
0re5ama

check_data

Sep 9th, 2021
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. --------------- no sales -------------------
  2.  
  3. select * from "BillingRegister"."BillingRegisterDetails" brd
  4. left outer join "BillingRegister"."SalesRegisters" sr
  5. on sr."BRDetId" = brd."Id"
  6. aand brd."BillingRegisterTypeId" = 1
  7. and sr."Id" is null
  8.  
  9.  
  10. select * from "BillingRegister"."BillingRegisterDetails" brd
  11. where brd."BillingRegisterTypeId" = 1
  12. and "StatusId" = 4
  13. and "Id" not in (select "BillingRegisterId" from "BillingRegister"."SalesRegisters" sr)
  14.  
  15.  
  16. select coalesce(replace('2,000', ',', '')::numeric, 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement