QUERY PLAN
Aggregate (cost=4.32..4.33 rows=1 width=32)
-> Hash Join (cost=1.56..4.31 rows=1 width=5)
Hash Cond: (t.id = r.erp_other_collect_ticket_id)
-> Seq Scan on tbl_erp_other_collect_tickets t (cost=0.00..2.59 rows=40 width=4)
Filter: ((bank_settle_at IS NOT NULL) AND (status = ANY ('{2,5}'::integer[])))
-> Hash (cost=1.55..1.55 rows=1 width=9)
-> Seq Scan on tbl_erp_other_collect_ticket_bank_outs r (cost=0.00..1.55 rows=1 width=9)
Filter: (erp_bank_id = 2)