{ "data": { "question": { "questionId": "3695", "questionFrontendId": "3358", "categoryTitle": "Database", "boundTopicId": 2992013, "title": "Books with NULL Ratings", "titleSlug": "books-with-null-ratings", "content": null, "translatedTitle": "评分为 NULL 的图书", "translatedContent": null, "isPaidOnly": true, "difficulty": "Easy", "likes": 0, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"162\", \"totalSubmission\": \"171\", \"totalAcceptedRaw\": 162, \"totalSubmissionRaw\": 171, \"acRate\": \"94.7%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"books\":[\"book_id\",\"title\",\"author\",\"published_year\",\"rating\"]},\"rows\":{\"books\":[[1,\"The Great Gatsby\",\"F. Scott\",1925,4.5],[2,\"To Kill a Mockingbird\",\"Harper Lee\",1960,null],[3,\"Pride and Prejudice\",\"Jane Austen\",1813,4.8],[4,\"The Catcher in the Rye\",\"J.D. Salinger\",1951,null],[5,\"Animal Farm\",\"George Orwell\",1945,4.2],[6,\"Lord of the Flies\",\"William Golding\",1954,null]]}}", "metaData": "{\"mysql\":[\"Create table books (\\n book_id int,\\n title varchar(255),\\n author varchar(100),\\n published_year int,\\n rating decimal(3,1)\\n)\"],\"mssql\":[\"Create table books (\\n book_id int,\\n title varchar(255),\\n author varchar(100),\\n published_year int,\\n rating decimal(3,1)\\n)\"],\"oraclesql\":[\"Create table books (\\n book_id number,\\n title varchar2(255),\\n author varchar2(100),\\n published_year number,\\n rating number(3,1)\\n)\"],\"database\":true,\"name\":\"find_unrated_books\",\"postgresql\":[\"CREATE TABLE books (\\n book_id INTEGER,\\n title VARCHAR(255),\\n author VARCHAR(100),\\n published_year INTEGER,\\n rating NUMERIC(3, 1)\\n);\\n\"],\"pythondata\":[\"books = pd.DataFrame({ \\\"book_id\\\": pd.Series(dtype=\\\"int\\\"), \\\"title\\\": pd.Series(dtype=\\\"str\\\"), \\\"author\\\": pd.Series(dtype=\\\"str\\\"), \\\"published_year\\\": pd.Series(dtype=\\\"int\\\"), \\\"rating\\\": pd.Series(dtype=\\\"float\\\") })\\n\"],\"database_schema\":{\"books\":{\"book_id\":\"INT\",\"title\":\"VARCHAR(255)\",\"author\":\"VARCHAR(100)\",\"published_year\":\"INT\",\"rating\":\"DECIMAL(3, 1)\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table books (\n book_id int,\n title varchar(255),\n author varchar(100),\n published_year int,\n rating decimal(3,1)\n)", "Truncate table books", "insert into books (book_id, title, author, published_year, rating) values ('1', 'The Great Gatsby', 'F. Scott', '1925', '4.5')", "insert into books (book_id, title, author, published_year, rating) values ('2', 'To Kill a Mockingbird', 'Harper Lee', '1960', NULL)", "insert into books (book_id, title, author, published_year, rating) values ('3', 'Pride and Prejudice', 'Jane Austen', '1813', '4.8')", "insert into books (book_id, title, author, published_year, rating) values ('4', 'The Catcher in the Rye', 'J.D. Salinger', '1951', NULL)", "insert into books (book_id, title, author, published_year, rating) values ('5', 'Animal Farm', 'George Orwell', '1945', '4.2')", "insert into books (book_id, title, author, published_year, rating) values ('6', 'Lord of the Flies', 'William Golding', '1954', NULL)" ], "enableRunCode": true, "envInfo": "{\"mysql\":[\"MySQL\",\"

\\u7248\\u672c\\uff1aMySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"

mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"

Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"

Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"

PostgreSQL 16<\\/p>\"]}", "book": null, "isSubscribed": false, "isDailyQuestion": false, "dailyRecordStatus": null, "editorType": "CKEDITOR", "ugcQuestionId": null, "style": "LEETCODE", "exampleTestcases": "{\"headers\":{\"books\":[\"book_id\",\"title\",\"author\",\"published_year\",\"rating\"]},\"rows\":{\"books\":[[1,\"The Great Gatsby\",\"F. Scott\",1925,4.5],[2,\"To Kill a Mockingbird\",\"Harper Lee\",1960,null],[3,\"Pride and Prejudice\",\"Jane Austen\",1813,4.8],[4,\"The Catcher in the Rye\",\"J.D. Salinger\",1951,null],[5,\"Animal Farm\",\"George Orwell\",1945,4.2],[6,\"Lord of the Flies\",\"William Golding\",1954,null]]}}", "__typename": "QuestionNode" } } }