SQL problem - List the Products Ordered in a Period
Problem
Query
SELECT
p.product_name,
SUM(o.unit) as unit
FROM
Products p,
Orders o
WHERE
p.product_id = o.product_id
AND YEAR(o.order_date) = 2020
AND MONTH(o.order_date) = 2
GROUP BY
product_name
HAVING
SUM(o.unit) >= 100