QUERY PLAN
Aggregate (cost=2.53..2.54 rows=1 width=32)
-> Hash Right Join (cost=1.15..2.50 rows=9 width=6)
Hash Cond: (eipss.erp_sales_gift_id = t.id)
-> Seq Scan on tbl_erp_inventory_product_spents eipss (cost=0.00..1.26 rows=26 width=10)
-> Hash (cost=1.11..1.11 rows=3 width=4)
-> Seq Scan on tbl_erp_sales_gifts t (cost=0.00..1.11 rows=3 width=4)
Filter: (status = 2)