QUERY PLAN
GroupAggregate (cost=0.00..18.23 rows=10 width=580)
Group Key: eip.product_id
-> Nested Loop (cost=0.00..17.16 rows=10 width=64)
Join Filter: (eip.erp_store_id = saleable_store.id)
-> Seq Scan on tbl_erp_stores saleable_store (cost=0.00..1.02 rows=1 width=4)
Filter: ((NOT is_delete) AND is_saleable_inventory)
-> Seq Scan on tbl_erp_inventory_products eip (cost=0.00..15.88 rows=21 width=68)
Filter: (product_id = 2261)