QUERY PLAN
Aggregate (cost=25.88..25.89 rows=1 width=32)
-> Hash Join (cost=1.32..24.24 rows=652 width=32)
Hash Cond: (r.erp_wage_ticket_id = t.id)
-> Seq Scan on tbl_erp_wage_ticket_amount_payments r (cost=0.00..20.20 rows=1015 width=36)
Filter: (erp_other_collect_ticket_id IS NOT NULL)
-> Hash (cost=1.21..1.21 rows=9 width=4)
-> Seq Scan on tbl_erp_wage_tickets t (cost=0.00..1.21 rows=9 width=4)
Filter: ((verify_at <= '2026-06-30 23:59:59+08'::timestamp with time zone) AND (status = 2))