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