8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 651c552 commit 2597d2bCopy full SHA for 2597d2b
README.md
@@ -568,4 +568,28 @@ GROUP_CONCAT(DISTINCT product) AS 'products'
568
FROM Activities
569
GROUP BY sell_date
570
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
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
+)
595
```
0 commit comments