List the Products Ordered in a Period
Task: Get the names of products that have at least 100 units ordered in February 2020 and their amount.
Table: Products
+------------------+-------------+
| Column Name | Type |
+------------------+-------------+
| product_id | INT |
| product_name | varchar(40) |
| product_category | varchar(40) |
+------------------+-------------+
Table: Orders
+-------------+------+
| Column Name | Type |
+-------------+------+
| product_id | INT |
| order_date | date |
| unit | INT |
+-------------+------+
Input: Products table:
+------------+-----------------------+------------------+
| product_id | product_name | product_category |
+------------+-----------------------+------------------+
| 1 | Leetcode Solutions | Book |
| 2 | Jewels of Stringology | Book |
| 3 | HP | Laptop |
| 4 | Lenovo | Laptop |
| 5 | Leetcode Kit | T-shirt |
+------------+-----------------------+------------------+
Orders table:
+------------+------------+------+
| product_id | order_date | unit |
+------------+------------+------+
| 1 | 2020-02-05 | 60 |
| 1 | 2020-02-10 | 70 |
| 2 | 2020-01-18 | 30 |
| 2 | 2020-02-11 | 80 |
| 3 | 2020-02-17 | 2 |
| 3 | 2020-02-24 | 3 |
| 4 | 2020-03-01 | 20 |
| 4 | 2020-03-04 | 30 |
| 4 | 2020-03-04 | 60 |
| 5 | 2020-02-25 | 50 |
| 5 | 2020-02-27 | 50 |
| 5 | 2020-03-01 | 50 |
+------------+------------+------+
Output:
+--------------------+------+
| product_name | unit |
+--------------------+------+
| Leetcode Solutions | 130 |
| Leetcode Kit | 100 |
+--------------------+------+