{ "data": { "question": { "questionId": "1801", "questionFrontendId": "1661", "boundTopicId": null, "title": "Average Time of Process per Machine", "titleSlug": "average-time-of-process-per-machine", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Easy", "likes": 85, "dislikes": 19, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "{\"headers\":{\"Activity\":[\"machine_id\",\"process_id\",\"activity_type\",\"timestamp\"]},\"rows\":{\"Activity\":[[0,0,\"start\",0.712],[0,0,\"end\",1.52],[0,1,\"start\",3.14],[0,1,\"end\",4.12],[1,0,\"start\",0.55],[1,0,\"end\",1.55],[1,1,\"start\",0.43],[1,1,\"end\",1.42],[2,0,\"start\",4.1],[2,0,\"end\",4.512],[2,1,\"start\",2.5],[2,1,\"end\",5]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"14.9K\", \"totalSubmission\": \"18.7K\", \"totalAcceptedRaw\": 14920, \"totalSubmissionRaw\": 18693, \"acRate\": \"79.8%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Activity\":[\"machine_id\",\"process_id\",\"activity_type\",\"timestamp\"]},\"rows\":{\"Activity\":[[0,0,\"start\",0.712],[0,0,\"end\",1.52],[0,1,\"start\",3.14],[0,1,\"end\",4.12],[1,0,\"start\",0.55],[1,0,\"end\",1.55],[1,1,\"start\",0.43],[1,1,\"end\",1.42],[2,0,\"start\",4.1],[2,0,\"end\",4.512],[2,1,\"start\",2.5],[2,1,\"end\",5]]}}", "metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Activity (machine_id int, process_id int, activity_type ENUM('start', 'end'), timestamp float)\"\n ],\n \"mssql\": [\n \"create table Activity (machine_id int, process_id int, activity_type varchar(15) not null check(activity_type in ('start', 'end')), timestamp float)\"\n ],\n \"oraclesql\": [\n \"create table Activity (machine_id int, process_id int, activity_type varchar(15) not null check(activity_type in ('start', 'end')), timestamp float)\"\n ],\n \"database\": true\n}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Activity (machine_id int, process_id int, activity_type ENUM('start', 'end'), timestamp float)", "Truncate table Activity", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('0', '0', 'start', '0.712')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('0', '0', 'end', '1.52')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('0', '1', 'start', '3.14')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('0', '1', 'end', '4.12')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('1', '0', 'start', '0.55')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('1', '0', 'end', '1.55')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('1', '1', 'start', '0.43')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('1', '1', 'end', '1.42')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('2', '0', 'start', '4.1')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('2', '0', 'end', '4.512')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('2', '1', 'start', '2.5')", "insert into Activity (machine_id, process_id, activity_type, timestamp) values ('2', '1', 'end', '5')" ], "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" } } }