QUERY PLAN
Aggregate (cost=9.55..9.56 rows=1 width=32)
-> Hash Join (cost=1.25..7.87 rows=134 width=15)
Hash Cond: (am.erp_social_insurance_id = t.id)
-> Seq Scan on tbl_erp_social_insurance_amounts am (cost=0.00..5.67 rows=267 width=19)
-> Hash (cost=1.18..1.18 rows=6 width=4)
-> Seq Scan on tbl_erp_social_insurances t (cost=0.00..1.18 rows=6 width=4)
Filter: ((bank_settle_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND (status = 2))