QUERY PLAN
Aggregate (cost=24.91..24.92 rows=1 width=32)
-> Hash Join (cost=1.26..24.18 rows=290 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=4 width=4)
-> Seq Scan on tbl_erp_wage_tickets t (cost=0.00..1.21 rows=4 width=4)
Filter: ((verify_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND (status = 2))