SQL query to find product names that have at least 100 units ordered in February 2020
ApproachJOIN Products p ON p.product_id = o.product_id ensures we fetch product names from the Products table.WHERE DATE_FORMAT(o.order_date, '%Y-%m') = '2020-0

# Approach
JOIN Products p ON p.product_id = o.product_id ensures we fetch product names from the Products table.

WHERE DATE_FORMAT(o.order_date, '%Y-%m') = '2020-02' filters only orders from February 2020.

SUM(o.unit) AS unit calculates the total units ordered per product.

GROUP BY p.product_id groups results by product.

HAVING SUM(o.unit) >= 100 ensures only products with at least 100 units ordered are included.
<!-- Describe your approach to solving the problem. -->


# Code
```mysql []
# Write your MySQL query statement below
select p.product_name, sum(o.unit) as unit
from Products p
join Orders o on p.product_id = o.product_id
where date_format(o.order_date, '%Y-%m') = '2020-02'
group by p.product_id
having sum(o.unit) >= 100;
```
['MySQL']