fork download
  1. select * from new_lms_customerwallettransaction cwt
  2. join new_lms_customerwallet cw on cw.id = cwt.customer_wallet_id
  3. join crm_app_customer c on c.id = cw.customer_id
  4. where cwt.created_at ::date >= '2025-10-28' and c.id in (649830, 270907, 516056, 406568, 127146, 280781, 148747, 144544, 88286);
  5.  
  6.  
  7.  
  8. select * from ledger_amount where id in (183955829, 183968303, 183956677, 183955077, 183956049, 183967747, 183976131, 183947869, 183956605);
  9.  
  10. select * from ledger_entry where id in (25773430, 25777103, 25773726, 25773157, 25773519, 25776889, 25779231, 25771430, 25773702)
  11.  
  12.  
  13.  
  14. UPDATE new_lms_customerwallet cw
  15. SET total_amount = COALESCE((
  16. SELECT SUM(t.amount)
  17. FROM new_lms_customerwallettransaction t
  18. WHERE t.customer_wallet_id = cw.id
  19. ), 0)
  20. WHERE cw.id IN (14549, 11813, 14377, 14550, 13825, 6432, 14551, 14552, 14553);
  21.  
  22. update loan_app_loan set last_closing_day ='2025-10-27', last_lms_closing_day ='2025-10-27' where id in (89793, 49313, 92567, 55087, 31546);
Success #stdin #stdout #stderr 0.01s 5292KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: near line 1: unrecognized token: ":"
Error: near line 8: no such table: ledger_amount
Error: near line 10: near "UPDATE": syntax error
Error: near line 22: no such table: loan_app_loan