QUERY PLAN
Aggregate (cost=24.16..24.17 rows=1 width=32)
-> Hash Join (cost=1.38..24.14 rows=5 width=32)
Hash Cond: (r.erp_wage_ticket_id = t.id)
-> Seq Scan on tbl_erp_wage_ticket_amount_payments r (cost=0.00..22.75 rows=5 width=36)
Filter: (erp_other_collect_ticket_id = 66)
-> Hash (cost=1.21..1.21 rows=14 width=4)
-> Seq Scan on tbl_erp_wage_tickets t (cost=0.00..1.21 rows=14 width=4)
Filter: (status = ANY ('{1,2,5}'::integer[]))