QUERY PLAN
Aggregate (cost=85.38..85.39 rows=1 width=8)
-> HashAggregate (cost=84.39..84.83 rows=44 width=665)
Group Key: p.id
-> Hash Join (cost=4.89..84.28 rows=44 width=4)
Hash Cond: (p.id = eip.product_id)
-> Seq Scan on tbl_products p (cost=0.00..64.40 rows=1940 width=20)
-> Hash (cost=4.34..4.34 rows=44 width=4)
-> Seq Scan on tbl_erp_inventory_products eip (cost=0.00..4.34 rows=44 width=4)
Filter: (inventory > '0'::numeric)