{ "data": { "question": { "questionId": "3465", "questionFrontendId": "3156", "categoryTitle": "Database", "boundTopicId": 2783743, "title": "Employee Task Duration and Concurrent Tasks", "titleSlug": "employee-task-duration-and-concurrent-tasks", "content": null, "translatedTitle": "员工任务持续时间和并发任务", "translatedContent": null, "isPaidOnly": true, "difficulty": "Hard", "likes": 1, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"40\", \"totalSubmission\": \"87\", \"totalAcceptedRaw\": 40, \"totalSubmissionRaw\": 87, \"acRate\": \"46.0%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Tasks\":[\"task_id\",\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"Tasks\":[[1,1001,\"2023-05-01 08:00:00\",\"2023-05-01 09:00:00\"],[2,1001,\"2023-05-01 08:30:00\",\"2023-05-01 10:30:00\"],[3,1001,\"2023-05-01 11:00:00\",\"2023-05-01 12:00:00\"],[7,1001,\"2023-05-01 13:00:00\",\"2023-05-01 15:30:00\"],[4,1002,\"2023-05-01 09:00:00\",\"2023-05-01 10:00:00\"],[5,1002,\"2023-05-01 09:30:00\",\"2023-05-01 11:30:00\"],[6,1003,\"2023-05-01 14:00:00\",\"2023-05-01 16:00:00\"]]}}", "metaData": "{\"mysql\":[\"CREATE TABLE if Not exists Tasks (\\n task_id INT ,\\n employee_id INT,\\n start_time DATETIME,\\n end_time DATETIME\\n);\"],\"mssql\":[\"CREATE TABLE Tasks (\\n task_id INT PRIMARY KEY,\\n employee_id INT,\\n start_time DATETIME,\\n end_time DATETIME\\n);\\n\"],\"oraclesql\":[\"CREATE TABLE Tasks (\\n task_id int ,\\n employee_id int,\\n start_time DATE,\\n end_time DATE\\n)\\n\\n\\n\\n\\n\\n\\n\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Tasks (\\n task_id INT,\\n employee_id INT,\\n start_time TIMESTAMP,\\n end_time TIMESTAMP\\n);\\n\"],\"pythondata\":[\"Tasks = pd.DataFrame([], columns=['task_id', 'employee_id', 'start_time', 'end_time']).astype({\\n 'task_id': 'Int64',\\n 'employee_id': 'Int64',\\n 'start_time': 'datetime64[ns]',\\n 'end_time': 'datetime64[ns]'\\n})\"],\"database\":true,\"name\":\"find_total_duration\",\"database_schema\":{\"Tasks\":{\"task_id\":\"INT\",\"employee_id\":\"INT\",\"start_time\":\"DATETIME\",\"end_time\":\"DATETIME\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "CREATE TABLE if Not exists Tasks (\n task_id INT ,\n employee_id INT,\n start_time DATETIME,\n end_time DATETIME\n);", "Truncate table Tasks", "insert into Tasks (task_id, employee_id, start_time, end_time) values ('1', '1001', '2023-05-01 08:00:00', '2023-05-01 09:00:00')", "insert into Tasks (task_id, employee_id, start_time, end_time) values ('2', '1001', '2023-05-01 08:30:00', '2023-05-01 10:30:00')", "insert into Tasks (task_id, employee_id, start_time, end_time) values ('3', '1001', '2023-05-01 11:00:00', '2023-05-01 12:00:00')", "insert into Tasks (task_id, employee_id, start_time, end_time) values ('7', '1001', '2023-05-01 13:00:00', '2023-05-01 15:30:00')", "insert into Tasks (task_id, employee_id, start_time, end_time) values ('4', '1002', '2023-05-01 09:00:00', '2023-05-01 10:00:00')", "insert into Tasks (task_id, employee_id, start_time, end_time) values ('5', '1002', '2023-05-01 09:30:00', '2023-05-01 11:30:00')", "insert into Tasks (task_id, employee_id, start_time, end_time) values ('6', '1003', '2023-05-01 14:00:00', '2023-05-01 16:00:00')" ], "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\":{\"Tasks\":[\"task_id\",\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"Tasks\":[[1,1001,\"2023-05-01 08:00:00\",\"2023-05-01 09:00:00\"],[2,1001,\"2023-05-01 08:30:00\",\"2023-05-01 10:30:00\"],[3,1001,\"2023-05-01 11:00:00\",\"2023-05-01 12:00:00\"],[7,1001,\"2023-05-01 13:00:00\",\"2023-05-01 15:30:00\"],[4,1002,\"2023-05-01 09:00:00\",\"2023-05-01 10:00:00\"],[5,1002,\"2023-05-01 09:30:00\",\"2023-05-01 11:30:00\"],[6,1003,\"2023-05-01 14:00:00\",\"2023-05-01 16:00:00\"]]}}", "__typename": "QuestionNode" } } }