"content":"<p>Table: <code>Movies</code></p>\n\n<pre>\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| movie_id | int |\n| title | varchar |\n+---------------+---------+\nmovie_id is the primary key (column with unique values) for this table.\ntitle is the name of the movie.\n</pre>\n\n<p> </p>\n\n<p>Table: <code>Users</code></p>\n\n<pre>\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| user_id | int |\n| name | varchar |\n+---------------+---------+\nuser_id is the primary key (column with unique values) for this table.\n</pre>\n\n<p> </p>\n\n<p>Table: <code>MovieRating</code></p>\n\n<pre>\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| movie_id | int |\n| user_id | int |\n| rating | int |\n| created_at | date |\n+---------------+---------+\n(movie_id, user_id) is the primary key (column with unique values) for this table.\nThis table contains the rating of a movie by a user in their review.\ncreated_at is the user's review date. \n</pre>\n\n<p> </p>\n\n<p>Write a solution to:</p>\n\n<ul>\n\t<li>Find the name of the user who has rated the greatest number of movies. In case of a tie, return the lexicographically smaller user name.</li>\n\t<li>Find the movie name with the <strong>highest average</strong> rating in <code>February 2020</code>. In case of a tie, return the lexicographically smaller movie name.</li>\n</ul>\n\n<p>The result format is in the following example.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> \nMovies table:\n+-------------+--------------+\n| movie_id | title |\n+-------------+--------------+\n| 1 | Avengers |\n| 2 | Frozen 2 |\n| 3 | Joker |\n+-------------+--------------+\nUsers table:\n+-------------+--------------+\n| user_id | name |\n+-------------+--------------+\n| 1 | Daniel |\n| 2 | Monica |\n| 3 | Maria |\n| 4 | James |\n+-------------+--------------+\nMovieRating table:\n+-------------+--------------+--------------+-------------+\n| movie_id | user_id | rating | created_at |\n+-------------+--------------+--------------+-------------+\n| 1 | 1 | 3 | 2020-01-12 |\n| 1 | 2 | 4 | 2020-02-11 |\n| 1 | 3 | 2 | 2020-02-12 |\n| 1 | 4 | 1 | 2020-01-01 |\n| 2 | 1 | 5 | 2020-02-17 | \n| 2 | 2 | 2 | 2020-02-01 | \n| 2 | 3 | 2 | 2020-03-01 |\n| 3 | 1 | 3 | 2020-02-22 | \n| 3 | 2 | 4 | 2020-02-25 | \n+-------------+--------------+--------------+-------------+\n<strong>Output:</strong> \n+--------------+\n| results |\n+--------------+\n| Daniel |\n| Frozen 2 |\n+--------------+\n<strong>Explanation:</strong> \nDaniel and Monica have rated 3 movies ("Avengers", "Frozen 2" and "Joker") but Daniel is smaller lexicographically.\nFrozen 2 and Joker have a rating average of 3.5 in February but Frozen 2 is smaller lexicographically.\n</pre>\n",