{ "data": { "question": { "questionId": "620", "questionFrontendId": "620", "boundTopicId": null, "title": "Not Boring Movies", "titleSlug": "not-boring-movies", "content": "

Table: Cinema

\n\n
\n+----------------+----------+\n| Column Name    | Type     |\n+----------------+----------+\n| id             | int      |\n| movie          | varchar  |\n| description    | varchar  |\n| rating         | float    |\n+----------------+----------+\nid is the primary key 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
\n\n

 

\n\n

Write an SQL query to report the movies with an odd-numbered ID and a description that is not "boring".

\n\n

Return the result table ordered by rating in descending order.

\n\n

The query result format is in the following example.

\n\n

 

\n

Example 1:

\n\n
\nInput: \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+----+------------+-------------+--------+\nOutput: \n+----+------------+-------------+--------+\n| id | movie      | description | rating |\n+----+------------+-------------+--------+\n| 5  | House card | Interesting | 9.1    |\n| 1  | War        | great 3D    | 8.9    |\n+----+------------+-------------+--------+\nExplanation: \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
\n", "translatedTitle": null, "translatedContent": null, "isPaidOnly": false, "difficulty": "Easy", "likes": 484, "dislikes": 362, "isLiked": null, "similarQuestions": "[]", "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]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": [ { "lang": "MySQL", "langSlug": "mysql", "code": "# Write your MySQL query statement below\n", "__typename": "CodeSnippetNode" }, { "lang": "MS SQL Server", "langSlug": "mssql", "code": "/* Write your T-SQL query statement below */\n", "__typename": "CodeSnippetNode" }, { "lang": "Oracle", "langSlug": "oraclesql", "code": "/* Write your PL/SQL query statement below */\n", "__typename": "CodeSnippetNode" } ], "stats": "{\"totalAccepted\": \"183.5K\", \"totalSubmission\": \"252.9K\", \"totalAcceptedRaw\": 183486, \"totalSubmissionRaw\": 252922, \"acRate\": \"72.5%\"}", "hints": [], "solution": { "id": "204", "canSeeDetail": true, "paidOnly": false, "hasVideoSolution": false, "paidOnlyVideo": 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": "{\n \"mysql\": [\n \"Create table If Not Exists cinema (id int, movie varchar(255), description varchar(255), rating float(2, 1))\"\n ],\n \"mssql\": [\n \"Create table cinema (id int, movie varchar(255), description varchar(255), rating decimal(2, 1))\"\n ],\n \"oraclesql\": [\n \"Create table cinema (id int, movie varchar(255), description varchar(255), rating number(2, 1))\"\n ],\n \"database\": true\n}", "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, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"mysql\": [\"MySQL\", \"

MySQL 8.0.

\"], \"mssql\": [\"MS SQL Server\", \"

mssql server 2019.

\"], \"oraclesql\": [\"Oracle\", \"

Oracle Sql 11.2.

\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }