SELECT a.store_id,b.store_name,c.product_category,a.inventory_quantity,a.sales_amount
FROM sales_inventory AS a
JOIN stores AS b ON a.store_id = b.store_id
JOIN products AS c ON a.product_id = c.product_id
WHERE a.inventory_quantity < 10 AND a.sales_amount > 5000
ORDER BY a.store_id ASC,a.product_id ASC

此题ez,一层SELECT就搞定了