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

Appearance settings

Commit 7a7e5b8

Browse filesBrowse files
committed
Update README.md
1 parent 14e106c commit 7a7e5b8
Copy full SHA for 7a7e5b8

File tree

Expand file treeCollapse file tree

1 file changed

+14
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-0
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,4 +544,18 @@ CASE WHEN MOD(id,2)=0 THEN (LAG(student) OVER (ORDER BY id))
544544
ELSE (LEAD(student, 1, student) OVER (ORDER BY id))
545545
END AS 'Student'
546546
FROM Seat
547+
```
548+
549+
[1327. List the Products Ordered in a Period](https://leetcode.com/problems/list-the-products-ordered-in-a-period/)
550+
```sql
551+
-- name, amt
552+
-- >= 100 units, feb 2020
553+
554+
SELECT p.product_name, SUM(o.unit) AS unit
555+
FROM Products p
556+
LEFT JOIN Orders o
557+
ON p.product_id = o.product_id
558+
WHERE DATE_FORMAT(order_date, '%Y-%m') = '2020-02'
559+
GROUP BY p.product_name
560+
HAVING SUM(o.unit) >= 100
547561
```

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.