2022-03-27 18:27:43 +08:00
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"question": {
|
|
|
|
"questionId": "1480",
|
|
|
|
"questionFrontendId": "1341",
|
|
|
|
"boundTopicId": null,
|
|
|
|
"title": "Movie Rating",
|
|
|
|
"titleSlug": "movie-rating",
|
|
|
|
"content": null,
|
|
|
|
"translatedTitle": null,
|
|
|
|
"translatedContent": null,
|
|
|
|
"isPaidOnly": true,
|
|
|
|
"difficulty": "Medium",
|
2022-05-02 23:44:12 +08:00
|
|
|
"likes": 92,
|
|
|
|
"dislikes": 62,
|
2022-03-27 18:27:43 +08:00
|
|
|
"isLiked": null,
|
|
|
|
"similarQuestions": "[]",
|
|
|
|
"exampleTestcases": "{\"headers\": {\"Movies\": [\"movie_id\", \"title\"], \"Users\": [\"user_id\", \"name\"], \"MovieRating\": [\"movie_id\", \"user_id\", \"rating\", \"created_at\"]}, \"rows\": {\"Movies\": [[1, \"Avengers\"], [2, \"Frozen 2\"], [3, \"Joker\"]], \"Users\": [[1, \"Daniel\"], [2, \"Monica\"], [3, \"Maria\"], [4, \"James\"]], \"MovieRating\": [[1, 1, 3, \"2020-01-12\"], [1, 2, 4, \"2020-02-11\"], [1, 3, 2, \"2020-02-12\"], [1, 4, 1, \"2020-01-01\"], [2, 1, 5, \"2020-02-17\"], [2, 2, 2, \"2020-02-01\"], [2, 3, 2, \"2020-03-01\"], [3, 1, 3, \"2020-02-22\"], [3, 2, 4, \"2020-02-25\"]]}}",
|
|
|
|
"categoryTitle": "Database",
|
|
|
|
"contributors": [],
|
|
|
|
"topicTags": [
|
|
|
|
{
|
|
|
|
"name": "Database",
|
|
|
|
"slug": "database",
|
|
|
|
"translatedName": null,
|
|
|
|
"__typename": "TopicTagNode"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"companyTagStats": null,
|
|
|
|
"codeSnippets": null,
|
2022-05-02 23:44:12 +08:00
|
|
|
"stats": "{\"totalAccepted\": \"18.9K\", \"totalSubmission\": \"32.4K\", \"totalAcceptedRaw\": 18855, \"totalSubmissionRaw\": 32438, \"acRate\": \"58.1%\"}",
|
2022-03-27 18:27:43 +08:00
|
|
|
"hints": [],
|
|
|
|
"solution": null,
|
|
|
|
"status": null,
|
|
|
|
"sampleTestCase": "{\"headers\": {\"Movies\": [\"movie_id\", \"title\"], \"Users\": [\"user_id\", \"name\"], \"MovieRating\": [\"movie_id\", \"user_id\", \"rating\", \"created_at\"]}, \"rows\": {\"Movies\": [[1, \"Avengers\"], [2, \"Frozen 2\"], [3, \"Joker\"]], \"Users\": [[1, \"Daniel\"], [2, \"Monica\"], [3, \"Maria\"], [4, \"James\"]], \"MovieRating\": [[1, 1, 3, \"2020-01-12\"], [1, 2, 4, \"2020-02-11\"], [1, 3, 2, \"2020-02-12\"], [1, 4, 1, \"2020-01-01\"], [2, 1, 5, \"2020-02-17\"], [2, 2, 2, \"2020-02-01\"], [2, 3, 2, \"2020-03-01\"], [3, 1, 3, \"2020-02-22\"], [3, 2, 4, \"2020-02-25\"]]}}",
|
|
|
|
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Movies (movie_id int, title varchar(30))\",\n \"Create table If Not Exists Users (user_id int, name varchar(30))\",\n \"Create table If Not Exists MovieRating (movie_id int, user_id int, rating int, created_at date)\"\n ],\n \"mssql\": [\n \"Create table Movies (movie_id int, title varchar(30))\",\n \"Create table Users (user_id int, name varchar(30))\",\n \"Create table MovieRating (movie_id int, user_id int, rating int, created_at date)\"\n ],\n \"oraclesql\": [\n \"Create table Movies (movie_id int, title varchar(30))\",\n \"Create table Users (user_id int, name varchar(30))\",\n \"Create table MovieRating (movie_id int, user_id int, rating int, created_at date)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
|
|
|
|
"judgerAvailable": true,
|
|
|
|
"judgeType": "large",
|
|
|
|
"mysqlSchemas": [
|
|
|
|
"Create table If Not Exists Movies (movie_id int, title varchar(30))",
|
|
|
|
"Create table If Not Exists Users (user_id int, name varchar(30))",
|
|
|
|
"Create table If Not Exists MovieRating (movie_id int, user_id int, rating int, created_at date)",
|
|
|
|
"Truncate table Movies",
|
|
|
|
"insert into Movies (movie_id, title) values ('1', 'Avengers')",
|
|
|
|
"insert into Movies (movie_id, title) values ('2', 'Frozen 2')",
|
|
|
|
"insert into Movies (movie_id, title) values ('3', 'Joker')",
|
|
|
|
"Truncate table Users",
|
|
|
|
"insert into Users (user_id, name) values ('1', 'Daniel')",
|
|
|
|
"insert into Users (user_id, name) values ('2', 'Monica')",
|
|
|
|
"insert into Users (user_id, name) values ('3', 'Maria')",
|
|
|
|
"insert into Users (user_id, name) values ('4', 'James')",
|
|
|
|
"Truncate table MovieRating",
|
|
|
|
"insert into MovieRating (movie_id, user_id, rating, created_at) values ('1', '1', '3', '2020-01-12')",
|
|
|
|
"insert into MovieRating (movie_id, user_id, rating, created_at) values ('1', '2', '4', '2020-02-11')",
|
|
|
|
"insert into MovieRating (movie_id, user_id, rating, created_at) values ('1', '3', '2', '2020-02-12')",
|
|
|
|
"insert into MovieRating (movie_id, user_id, rating, created_at) values ('1', '4', '1', '2020-01-01')",
|
|
|
|
"insert into MovieRating (movie_id, user_id, rating, created_at) values ('2', '1', '5', '2020-02-17')",
|
|
|
|
"insert into MovieRating (movie_id, user_id, rating, created_at) values ('2', '2', '2', '2020-02-01')",
|
|
|
|
"insert into MovieRating (movie_id, user_id, rating, created_at) values ('2', '3', '2', '2020-03-01')",
|
|
|
|
"insert into MovieRating (movie_id, user_id, rating, created_at) values ('3', '1', '3', '2020-02-22')",
|
|
|
|
"insert into MovieRating (movie_id, user_id, rating, created_at) values ('3', '2', '4', '2020-02-25')"
|
|
|
|
],
|
|
|
|
"enableRunCode": true,
|
|
|
|
"enableTestMode": false,
|
|
|
|
"enableDebugger": false,
|
|
|
|
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
|
|
|
|
"libraryUrl": null,
|
|
|
|
"adminUrl": null,
|
|
|
|
"challengeQuestion": null,
|
|
|
|
"__typename": "QuestionNode"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|