1341. Movie Rating
https://leetcode.com/problems/movie-rating
Description
Table: Movies
+---------------+---------+
| Column Name | Type |
+---------------+---------+
| movie\_id | int |
| title | varchar |
+---------------+---------+
movie\_id is the primary key for this table.
title is the name of the movie.Table: Users
+---------------+---------+
| Column Name | Type |
+---------------+---------+
| user\_id | int |
| name | varchar |
+---------------+---------+
user\_id is the primary key for this table.Table: Movie_Rating
Write the following SQL query:
Find the name of the user who has rated the greatest number of movies. In case of a tie, return lexicographically smaller user name.
Find the movie name with the highest average rating in February 2020. In case of a tie, return lexicographically smaller movie name.
The query is returned in 2 rows, the query result format is in the following example:
ac
Last updated
Was this helpful?