leetcodeSolution to some Leetcode problems written in C++ |
git clone git://git.dimitrijedobrota.com/leetcode.git |
Log | Files | Refs | README | LICENSE |
1341.sql (426B)
0 ( 1 SELECT name AS results 2 FROM MovieRating R 3 LEFT JOIN Users U 4 ON R.user_id = U.user_id 5 GROUP BY R.user_id 6 ORDER BY COUNT(*) DESC, U.name 7 LIMIT 1 8 ) UNION ALL ( 9 SELECT M.title 10 FROM MovieRating R 11 LEFT JOIN Movies M 12 ON R.movie_id = M.movie_id 13 WHERE YEAR(R.created_at) = 2020 AND MONTH(R.created_at) = 2 14 GROUP BY R.movie_id 15 ORDER BY AVG(R.rating) DESC, M.title 16 LIMIT 1 17 )