{ "data": { "question": { "questionId": "3002", "questionFrontendId": "2783", "categoryTitle": "Database", "boundTopicId": 2352589, "title": "Flight Occupancy and Waitlist Analysis", "titleSlug": "flight-occupancy-and-waitlist-analysis", "content": null, "translatedTitle": "航班入座率和等待名单分析", "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 0, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"287\", \"totalSubmission\": \"758\", \"totalAcceptedRaw\": 287, \"totalSubmissionRaw\": 758, \"acRate\": \"37.9%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Flights\":[\"flight_id\",\"capacity\"],\"Passengers\":[\"passenger_id\",\"flight_id\"]},\"rows\":{\"Flights\":[[1,2],[2,2],[3,1]],\"Passengers\":[[101,1],[102,1],[103,1],[104,2],[105,2],[106,3],[107,3]]}}", "metaData": "{\"mysql\":[\"Create table if not exists Flights(flight_id int,capacity int)\",\"Create table if not exists Passengers (passenger_id int,flight_id int)\"],\"mssql\":[\"Create table Flights(flight_id int,capacity int)\",\"Create table Passengers (passenger_id int,flight_id int)\"],\"oraclesql\":[\"Create table Flights(flight_id int,capacity int)\",\"Create table Passengers (passenger_id int,flight_id int)\"],\"database\":true,\"name\":\"waitlist_analysis\",\"pythondata\":[\"Flights = pd.DataFrame([], columns=['flight_id', 'capacity']).astype({'flight_id':'Int64', 'capacity':'Int64'})\",\"Passengers = pd.DataFrame([], columns=['passenger_id', 'flight_id']).astype({'passenger_id':'Int64', 'flight_id':'Int64'})\"],\"postgresql\":[\"Create table if not exists Flights(flight_id int,capacity int)\",\"Create table if not exists Passengers (passenger_id int,flight_id int)\"],\"database_schema\":{\"Flights\":{\"flight_id\":\"INT\",\"capacity\":\"INT\"},\"Passengers\":{\"passenger_id\":\"INT\",\"flight_id\":\"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table if not exists Flights(flight_id int,capacity int)", "Create table if not exists Passengers (passenger_id int,flight_id int)", "Truncate table Flights", "insert into Flights (flight_id, capacity) values ('1', '2')", "insert into Flights (flight_id, capacity) values ('2', '2')", "insert into Flights (flight_id, capacity) values ('3', '1')", "Truncate table Passengers", "insert into Passengers (passenger_id, flight_id) values ('101', '1')", "insert into Passengers (passenger_id, flight_id) values ('102', '1')", "insert into Passengers (passenger_id, flight_id) values ('103', '1')", "insert into Passengers (passenger_id, flight_id) values ('104', '2')", "insert into Passengers (passenger_id, flight_id) values ('105', '2')", "insert into Passengers (passenger_id, flight_id) values ('106', '3')", "insert into Passengers (passenger_id, flight_id) values ('107', '3')" ], "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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"

PostgreSQL 16<\\/p>\"]}", "book": null, "isSubscribed": false, "isDailyQuestion": false, "dailyRecordStatus": null, "editorType": "CKEDITOR", "ugcQuestionId": null, "style": "LEETCODE", "exampleTestcases": "{\"headers\":{\"Flights\":[\"flight_id\",\"capacity\"],\"Passengers\":[\"passenger_id\",\"flight_id\"]},\"rows\":{\"Flights\":[[1,2],[2,2],[3,1]],\"Passengers\":[[101,1],[102,1],[103,1],[104,2],[105,2],[106,3],[107,3]]}}", "__typename": "QuestionNode" } } }