QUERY PLAN
Aggregate (cost=25.96..25.97 rows=1 width=32)
-> Hash Right Join (cost=10.69..24.67 rows=518 width=5)
Hash Cond: (eipss.erp_sales_outbound_id = t.id)
-> Seq Scan on tbl_erp_inventory_product_spents eipss (cost=0.00..12.51 rows=551 width=9)
-> Hash (cost=8.90..8.90 rows=143 width=4)
-> Seq Scan on tbl_erp_sales_outbounds t (cost=0.00..8.90 rows=143 width=4)
Filter: (status = 2)