select i.store_id,store_name,product_category,inventory_quantity, sales_amount
from  sales_inventory i
join stores s on s.store_id=i.store_id
join products p on p.product_id=i.product_id
where  inventory_quantity < 10 and sales_amount > 5000
order by i.store_id,i.product_id;