Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4acd800

Browse files
List the Products Ordered in a Period
1 parent 9a7be0b commit 4acd800

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Link: https://leetcode.com/problems/list-the-products-ordered-in-a-period/
2+
Tool: MS SQL Server
3+
4+
5+
6+
7+
8+
9+
10+
select p.product_name, sum(o.unit) as unit
11+
from Products p, Orders o
12+
where p.product_id = o.product_id and order_date like '2020-02-%'
13+
group by p.product_name
14+
having sum(o.unit) >= 100

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /