1327. List the Products Ordered in a Period
https://leetcode.com/problems/list-the-products-ordered-in-a-period
Description
Table: Products
+------------------+---------+
| Column Name | Type |
+------------------+---------+
| product\_id | int |
| product\_name | varchar |
| product\_category | varchar |
+------------------+---------+
product\_id is the primary key for this table.
This table contains data about the company's products.Table: Orders
+---------------+---------+
| Column Name | Type |
+---------------+---------+
| product\_id | int |
| order\_date | date |
| unit | int |
+---------------+---------+
There is no primary key for this table. It may have duplicate rows.
product\_id is a foreign key to Products table.
unit is the number of products ordered in order\_date.Write an SQL query to get the names of products with greater than or equal to 100 units ordered in February 2020 and their amount.
Return result table in any order.
The query result format is in the following example:
ac
Last updated
Was this helpful?