题解 | 分析不同门店各类商品的库存情况和销售情况
分析不同门店各类商品的库存情况和销售情况
https://www.nowcoder.com/practice/5b9262a36724466ea1ae1f58187197d6
select a.store_id,
store_name,
product_category,
inventory_quantity,
sales_amount
from sales_inventory a
left join stores b on a.store_id = b.store_id
left join products c on a.product_id = c.product_id
where sales_amount >= 5000 and inventory_quantity < 10
order by a.store_id, a.product_id