QUERY PLAN
Aggregate (cost=3.78..3.79 rows=1 width=32)
-> Hash Join (cost=1.15..3.77 rows=1 width=32)
Hash Cond: (t.id = r.erp_other_collect_ticket_id)
-> Seq Scan on tbl_erp_other_collect_tickets t (cost=0.00..2.57 rows=12 width=4)
Filter: ((status = ANY ('{2,5}'::integer[])) AND (settle_amount >= amount))
-> Hash (cost=1.14..1.14 rows=1 width=36)
-> Seq Scan on tbl_erp_other_collect_ticket_approve_borrow_settles r (cost=0.00..1.14 rows=1 width=36)
Filter: (approve_id = 2775)