All Downloads are FREE. Search and download functionalities are using the official Maven repository.

g1301_1400.s1341_movie_rating.script.sql Maven / Gradle / Ivy

There is a newer version: 1.37
Show newest version
# Write your MySQL query statement below
# #Medium #Database #2023_08_16_Time_2515_ms_(78.94%)_Space_0B_(100.00%)
(SELECT name results
FROM Users as U, MovieRating as  MR
WHERE U.user_id = MR.user_id
GROUP BY U.user_id
ORDER BY COUNT(MR.user_id) DESC, name ASC LIMIT 1)
UNION ALL
(SELECT title results
FROM Movies as M, MovieRating as MR
WHERE M.movie_id = MR.movie_id AND created_at BETWEEN '2020-02-01' AND '2020-02-29'
GROUP BY M.movie_id
ORDER BY AVG(rating) DESC, title ASC LIMIT 1)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy