1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/originData/not-boring-movies.json

96 lines
9.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"data": {
"question": {
"questionId": "620",
"questionFrontendId": "620",
"categoryTitle": "Database",
"boundTopicId": 1258,
"title": "Not Boring Movies",
"titleSlug": "not-boring-movies",
"content": "<p>Table: <code>Cinema</code></p>\n\n<pre>\n+----------------+----------+\n| Column Name | Type |\n+----------------+----------+\n| id | int |\n| movie | varchar |\n| description | varchar |\n| rating | float |\n+----------------+----------+\nid is the primary key (column with unique values) for this table.\nEach row contains information about the name of a movie, its genre, and its rating.\nrating is a 2 decimal places float in the range [0, 10]\n</pre>\n\n<p>&nbsp;</p>\n\n<p>Write a solution to report the movies with an odd-numbered ID and a description that is not <code>&quot;boring&quot;</code>.</p>\n\n<p>Return the result table ordered by <code>rating</code> <strong>in descending order</strong>.</p>\n\n<p>The&nbsp;result format is in the following example.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> \nCinema table:\n+----+------------+-------------+--------+\n| id | movie | description | rating |\n+----+------------+-------------+--------+\n| 1 | War | great 3D | 8.9 |\n| 2 | Science | fiction | 8.5 |\n| 3 | irish | boring | 6.2 |\n| 4 | Ice song | Fantacy | 8.6 |\n| 5 | House card | Interesting | 9.1 |\n+----+------------+-------------+--------+\n<strong>Output:</strong> \n+----+------------+-------------+--------+\n| id | movie | description | rating |\n+----+------------+-------------+--------+\n| 5 | House card | Interesting | 9.1 |\n| 1 | War | great 3D | 8.9 |\n+----+------------+-------------+--------+\n<strong>Explanation:</strong> \nWe have three movies with odd-numbered IDs: 1, 3, and 5. The movie with ID = 3 is boring so we do not include it in the answer.\n</pre>\n",
"translatedTitle": "有趣的电影",
"translatedContent": "<p>表:<code>cinema</code></p>\n\n<pre>\n+----------------+----------+\n| Column Name | Type |\n+----------------+----------+\n| id | int |\n| movie | varchar |\n| description | varchar |\n| rating | float |\n+----------------+----------+\nid 是该表的主键(具有唯一值的列)。\n每行包含有关电影名称、类型和评级的信息。\n评级为 [0,10] 范围内的小数点后 2 位浮点数。\n</pre>\n\n<p>&nbsp;</p>\n\n<p>编写解决方案,找出所有影片描述为&nbsp;<strong>非</strong>&nbsp;<code>boring</code>&nbsp;(不无聊)&nbsp;的并且<strong> id 为奇数&nbsp;</strong>的影片。</p>\n\n<p>返回结果按&nbsp;<code>rating</code>&nbsp;<strong>降序排列</strong>。</p>\n\n<p>结果格式如下示例。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>\n+---------+-----------+--------------+-----------+\n| id | movie | description | rating |\n+---------+-----------+--------------+-----------+\n| 1 | War | great 3D | 8.9 |\n| 2 | Science | fiction | 8.5 |\n| 3 | irish | boring | 6.2 |\n| 4 | Ice song | Fantacy | 8.6 |\n| 5 | House card| Interesting| 9.1 |\n<strong>+---------+-----------+--------------+-----------+\n输出</strong>\n+---------+-----------+--------------+-----------+\n| id | movie | description | rating |\n+---------+-----------+--------------+-----------+\n| 5 | House card| Interesting| 9.1 |\n| 1 | War | great 3D | 8.9 |\n+---------+-----------+--------------+-----------+\n<strong>解释:</strong>\n我们有三部电影它们的 id 是奇数:1、3 和 5。id = 3 的电影是 boring 的,所以我们不把它包括在答案中。\n</pre>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 201,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false}",
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": [
{
"lang": "MySQL",
"langSlug": "mysql",
"code": "# Write your MySQL query statement below",
"__typename": "CodeSnippetNode"
},
{
"lang": "MS SQL Server",
"langSlug": "mssql",
"code": "/* Write your T-SQL query statement below */",
"__typename": "CodeSnippetNode"
},
{
"lang": "Oracle",
"langSlug": "oraclesql",
"code": "/* Write your PL/SQL query statement below */",
"__typename": "CodeSnippetNode"
},
{
"lang": "Pandas",
"langSlug": "pythondata",
"code": "import pandas as pd\n\ndef not_boring_movies(cinema: pd.DataFrame) -> pd.DataFrame:\n ",
"__typename": "CodeSnippetNode"
},
{
"lang": "PostgreSQL",
"langSlug": "postgresql",
"code": "-- Write your PostgreSQL query statement below",
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"150.5K\", \"totalSubmission\": \"195K\", \"totalAcceptedRaw\": 150503, \"totalSubmissionRaw\": 195037, \"acRate\": \"77.2%\"}",
"hints": [],
"solution": {
"id": "95",
"canSeeDetail": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "{\"headers\":{\"cinema\":[\"id\", \"movie\", \"description\", \"rating\"]},\"rows\":{\"cinema\":[[1, \"War\", \"great 3D\", 8.9], [2, \"Science\", \"fiction\", 8.5], [3, \"irish\", \"boring\", 6.2], [4, \"Ice song\", \"Fantacy\", 8.6], [5, \"House card\", \"Interesting\", 9.1]]}}",
"metaData": "{\"mysql\":[\"Create table If Not Exists cinema (id int, movie varchar(255), description varchar(255), rating float(2, 1))\"],\"mssql\":[\"Create table cinema (id int, movie varchar(255), description varchar(255), rating decimal(2, 1))\"],\"oraclesql\":[\"Create table cinema (id int, movie varchar(255), description varchar(255), rating number(2, 1))\"],\"database\":true,\"name\":\"not_boring_movies\",\"pythondata\":[\"cinema = pd.DataFrame([], columns=['id', 'movie', 'description', 'rating']).astype({'id':'Int64', 'movie':'object', 'description':'object', 'rating':'Float64'})\"],\"postgresql\":[\"Create table If Not Exists cinema (id int, movie varchar(255), description varchar(255), rating NUMERIC(3, 1))\"],\"manual\":false,\"database_schema\":{\"cinema\":{\"id\":\"INT\",\"movie\":\"VARCHAR(255)\",\"description\":\"VARCHAR(255)\",\"rating\":\"FLOAT(2, 1)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists cinema (id int, movie varchar(255), description varchar(255), rating float(2, 1))",
"Truncate table cinema",
"insert into cinema (id, movie, description, rating) values ('1', 'War', 'great 3D', '8.9')",
"insert into cinema (id, movie, description, rating) values ('2', 'Science', 'fiction', '8.5')",
"insert into cinema (id, movie, description, rating) values ('3', 'irish', 'boring', '6.2')",
"insert into cinema (id, movie, description, rating) values ('4', 'Ice song', 'Fantacy', '8.6')",
"insert into cinema (id, movie, description, rating) values ('5', 'House card', 'Interesting', '9.1')"
],
"enableRunCode": true,
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"cinema\":[\"id\", \"movie\", \"description\", \"rating\"]},\"rows\":{\"cinema\":[[1, \"War\", \"great 3D\", 8.9], [2, \"Science\", \"fiction\", 8.5], [3, \"irish\", \"boring\", 6.2], [4, \"Ice song\", \"Fantacy\", 8.6], [5, \"House card\", \"Interesting\", 9.1]]}}",
"__typename": "QuestionNode"
}
}
}