{ "data": { "question": { "questionId": "3003", "questionFrontendId": "2793", "categoryTitle": "Database", "boundTopicId": 2362110, "title": "Status of Flight Tickets", "titleSlug": "status-of-flight-tickets", "content": null, "translatedTitle": "航班机票状态", "translatedContent": null, "isPaidOnly": true, "difficulty": "Hard", "likes": 0, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"301\", \"totalSubmission\": \"451\", \"totalAcceptedRaw\": 301, \"totalSubmissionRaw\": 451, \"acRate\": \"66.7%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Flights\":[\"flight_id\",\"capacity\"],\"Passengers\":[\"passenger_id\",\"flight_id\",\"booking_time\"]},\"rows\":{\"Flights\":[[1,2],[2,2],[3,1]],\"Passengers\":[[101,1,\"2023-07-10 16:30:00\"],[102,1,\"2023-07-10 17:45:00\"],[103,1,\"2023-07-10 12:00:00\"],[104,2,\"2023-07-05 13:23:00\"],[105,2,\"2023-07-05 09:00:00\"],[106,3,\"2023-07-08 11:10:00\"],[107,3,\"2023-07-08 09:10:00\"]]}}", "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,booking_time datetime)\"],\"mssql\":[\"Create table Flights(flight_id int,capacity int)\",\"Create table Passengers (passenger_id int,flight_id int, booking_time datetime)\"],\"oraclesql\":[\"Create table Flights(flight_id int,capacity int)\",\"Create table Passengers (passenger_id int,flight_id int, booking_time date)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"],\"database\":true,\"name\":\"ticket_status\",\"pythondata\":[\"Flights = pd.DataFrame([], columns=['flight_id', 'capacity']).astype({'flight_id':'Int64', 'capacity':'Int64'})\",\"Passengers = pd.DataFrame([], columns=['passenger_id', 'flight_id', 'booking_time']).astype({'passenger_id':'Int64', 'flight_id':'Int64', 'booking_time':'datetime64[ns]'})\"],\"postgresql\":[\"Create table if not exists Flights(flight_id int,capacity int)\",\"Create table if not exists Passengers (passenger_id int,flight_id int,booking_time timestamp)\"],\"database_schema\":{\"Flights\":{\"flight_id\":\"INT\",\"capacity\":\"INT\"},\"Passengers\":{\"passenger_id\":\"INT\",\"flight_id\":\"INT\",\"booking_time\":\"DATETIME\"}}}", "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,booking_time datetime)", "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, booking_time) values ('101', '1', '2023-07-10 16:30:00')", "insert into Passengers (passenger_id, flight_id, booking_time) values ('102', '1', '2023-07-10 17:45:00')", "insert into Passengers (passenger_id, flight_id, booking_time) values ('103', '1', '2023-07-10 12:00:00')", "insert into Passengers (passenger_id, flight_id, booking_time) values ('104', '2', '2023-07-05 13:23:00')", "insert into Passengers (passenger_id, flight_id, booking_time) values ('105', '2', '2023-07-05 09:00:00')", "insert into Passengers (passenger_id, flight_id, booking_time) values ('106', '3', '2023-07-08 11:10:00')", "insert into Passengers (passenger_id, flight_id, booking_time) values ('107', '3', '2023-07-08 09:10:00')" ], "enableRunCode": true, "envInfo": "{\"mysql\":[\"MySQL\",\"
\\u7248\\u672c\\uff1a 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\",\"booking_time\"]},\"rows\":{\"Flights\":[[1,2],[2,2],[3,1]],\"Passengers\":[[101,1,\"2023-07-10 16:30:00\"],[102,1,\"2023-07-10 17:45:00\"],[103,1,\"2023-07-10 12:00:00\"],[104,2,\"2023-07-05 13:23:00\"],[105,2,\"2023-07-05 09:00:00\"],[106,3,\"2023-07-08 11:10:00\"],[107,3,\"2023-07-08 09:10:00\"]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"