You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(SELECT name AS results FROM (SELECT name, count(*) as rated_movies FROM MovieRating LEFT JOIN Users ONUsers.user_id=MovieRating.user_idGROUP BY name ORDER BY rated_movies DESC, name) RATINGS LIMIT1)
UNION ALL
(SELECT title AS results FROM (SELECT title, ROUND(AVG(rating),2) AS average_rating FROM MovieRating LEFT JOIN Movies ONMovies.movie_id=MovieRating.movie_idWHERE MONTH(created_at) =2AND YEAR(created_at) =2020GROUP BY title ORDER BY average_rating DESC, title) RATES LIMIT1)