Skip to content

Commit 954d10c

Browse files
authored
Update list-the-products-ordered-in-a-period.sql
1 parent 291b20e commit 954d10c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MySQL/list-the-products-ordered-in-a-period.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FROM (SELECT product_id,
77
Sum(unit) AS unit
88
FROM orders
99
WHERE order_date BETWEEN '2020-02-01' AND '2020-02-29'
10-
GROUP BY product_id) o
10+
GROUP BY product_id
11+
HAVING unit >= 100) o
1112
INNER JOIN products p
12-
ON o.product_id = p.product_id
13-
WHERE o.unit >= 100
13+
ON o.product_id = p.product_id

0 commit comments

Comments
 (0)