QUERY PLAN
Aggregate (cost=2.94..2.95 rows=1 width=32)
-> Hash Join (cost=1.58..2.91 rows=11 width=6)
Hash Cond: (r.erp_bank_transfer_ticket_id = t.id)
-> Seq Scan on tbl_erp_bank_transfer_ticket_bank_outs r (cost=0.00..1.30 rows=12 width=10)
Filter: (erp_bank_id = 1)
-> Hash (cost=1.30..1.30 rows=22 width=4)
-> Seq Scan on tbl_erp_bank_transfer_tickets t (cost=0.00..1.30 rows=22 width=4)
Filter: (status = ANY ('{2,5}'::integer[]))