Problem: 1327. 列出指定时间段内所有的下单产品
SELECT product_name, SUM(unit) AS unit
FROM Products
JOIN Orders
USING (product_id)
-- on Products.product_id = Orders.product_id
WHERE order_date LIKE "2020-02%"
GROUP BY product_name
HAVING unit >= 100;
Problem: 1327. 列出指定时间段内所有的下单产品
SELECT product_name, SUM(unit) AS unit
FROM Products
JOIN Orders
USING (product_id)
-- on Products.product_id = Orders.product_id
WHERE order_date LIKE "2020-02%"
GROUP BY product_name
HAVING unit >= 100;