QUERY PLAN
Aggregate (cost=19.43..19.44 rows=1 width=32)
-> Hash Right Join (cost=5.27..19.41 rows=4 width=5)
Hash Cond: (eipss.erp_sales_gift_id = t.id)
-> Seq Scan on tbl_erp_inventory_product_spents eipss (cost=0.00..12.65 rows=565 width=9)
-> Hash (cost=5.26..5.26 rows=1 width=4)
-> Seq Scan on tbl_erp_sales_gifts t (cost=0.00..5.26 rows=1 width=4)
Filter: ((verify_at >= '2026-06-01 00:00:00+08'::timestamp with time zone) AND (verify_at <= '2026-06-30 23:59:59+08'::timestamp with time zone) AND (status = 2))