QUERY PLAN
Aggregate (cost=7.28..7.29 rows=1 width=32)
-> Hash Right Join (cost=1.06..7.08 rows=79 width=5)
Hash Cond: (eipss.erp_inventory_lost_id = t.id)
-> Seq Scan on tbl_erp_inventory_product_spents eipss (cost=0.00..5.36 rows=236 width=9)
-> Hash (cost=1.04..1.04 rows=1 width=4)
-> Seq Scan on tbl_erp_inventory_losts t (cost=0.00..1.04 rows=1 width=4)
Filter: ((verify_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND (status = 2))