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 2597d2b

Browse filesBrowse files
committed
Update README.md
1 parent 651c552 commit 2597d2b
Copy full SHA for 2597d2b

File tree

1 file changed

+24
-0
lines changed
Filter options

1 file changed

+24
-0
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,4 +568,28 @@ GROUP_CONCAT(DISTINCT product) AS 'products'
568568
FROM Activities
569569
GROUP BY sell_date
570570
ORDER BY sell_date
571+
```
572+
573+
[1341. Movie Rating](https://leetcode.com/problems/movie-rating/)
574+
575+
```sql
576+
(SELECT name AS results
577+
FROM Users u
578+
LEFT JOIN MovieRating mr
579+
ON u.user_id = mr.user_id
580+
GROUP BY name
581+
ORDER BY COUNT(rating) DESC, name ASC
582+
LIMIT 1)
583+
584+
UNION ALL
585+
586+
(SELECT title
587+
FROM Movies m
588+
LEFT JOIN MovieRating mr
589+
ON m.movie_id = mr.movie_id
590+
WHERE DATE_FORMAT(created_at, '%Y-%m') = '2020-02'
591+
GROUP BY title
592+
ORDER BY AVG(rating) DESC, title ASC
593+
LIMIT 1
594+
)
571595
```

0 commit comments

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