{ "data": { "question": { "questionId": "2185", "questionFrontendId": "2041", "boundTopicId": null, "title": "Accepted Candidates From the Interviews", "titleSlug": "accepted-candidates-from-the-interviews", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 48, "dislikes": 27, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "{\"headers\":{\"Candidates\":[\"candidate_id\",\"name\",\"years_of_exp\",\"interview_id\"],\"Rounds\":[\"interview_id\",\"round_id\",\"score\"]},\"rows\":{\"Candidates\":[[11,\"Atticus\",1,101],[9,\"Ruben\",6,104],[6,\"Aliza\",10,109],[8,\"Alfredo\",0,107]],\"Rounds\":[[109,3,4],[101,2,8],[109,4,1],[107,1,3],[104,3,6],[109,1,4],[104,4,7],[104,1,2],[109,2,1],[104,2,7],[107,2,3],[101,1,8]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"8K\", \"totalSubmission\": \"10.3K\", \"totalAcceptedRaw\": 8012, \"totalSubmissionRaw\": 10299, \"acRate\": \"77.8%\"}", "hints": [], "solution": { "id": "2180", "canSeeDetail": true, "paidOnly": false, "hasVideoSolution": false, "paidOnlyVideo": true, "__typename": "ArticleNode" }, "status": null, "sampleTestCase": "{\"headers\":{\"Candidates\":[\"candidate_id\",\"name\",\"years_of_exp\",\"interview_id\"],\"Rounds\":[\"interview_id\",\"round_id\",\"score\"]},\"rows\":{\"Candidates\":[[11,\"Atticus\",1,101],[9,\"Ruben\",6,104],[6,\"Aliza\",10,109],[8,\"Alfredo\",0,107]],\"Rounds\":[[109,3,4],[101,2,8],[109,4,1],[107,1,3],[104,3,6],[109,1,4],[104,4,7],[104,1,2],[109,2,1],[104,2,7],[107,2,3],[101,1,8]]}}", "metaData": "{\"mysql\": [\"Create table If Not Exists Candidates (candidate_id int, name varchar(30), years_of_exp int, interview_id int)\", \"Create table If Not Exists Rounds (interview_id int, round_id int, score int)\"], \"mssql\": [\"Create table Candidates (candidate_id int, name varchar(30), years_of_exp int, interview_id int)\", \"Create table Rounds (interview_id int, round_id int, score int)\"], \"oraclesql\": [\"Create table Candidates (candidate_id int, name varchar(30), years_of_exp int, interview_id int)\", \"Create table Rounds (interview_id int, round_id int, score int)\"], \"database\": true, \"name\": \"accepted_candidates\", \"pythondata\": [\"Candidates = pd.DataFrame([], columns=['candidate_id', 'name', 'years_of_exp', 'interview_id']).astype({'candidate_id':'Int64', 'name':'object', 'years_of_exp':'Int64', 'interview_id':'Int64'})\", \"Rounds = pd.DataFrame([], columns=['interview_id', 'round_id', 'score']).astype({'interview_id':'Int64', 'round_id':'Int64', 'score':'Int64'})\"], \"postgresql\": [\"Create table If Not Exists Candidates (candidate_id int, name varchar(30), years_of_exp int, interview_id int)\", \"Create table If Not Exists Rounds (interview_id int, round_id int, score int)\"], \"database_schema\": {\"Candidates\": {\"candidate_id\": \"INT\", \"name\": \"VARCHAR(30)\", \"years_of_exp\": \"INT\", \"interview_id\": \"INT\"}, \"Rounds\": {\"interview_id\": \"INT\", \"round_id\": \"INT\", \"score\": \"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Candidates (candidate_id int, name varchar(30), years_of_exp int, interview_id int)", "Create table If Not Exists Rounds (interview_id int, round_id int, score int)", "Truncate table Candidates", "insert into Candidates (candidate_id, name, years_of_exp, interview_id) values ('11', 'Atticus', '1', '101')", "insert into Candidates (candidate_id, name, years_of_exp, interview_id) values ('9', 'Ruben', '6', '104')", "insert into Candidates (candidate_id, name, years_of_exp, interview_id) values ('6', 'Aliza', '10', '109')", "insert into Candidates (candidate_id, name, years_of_exp, interview_id) values ('8', 'Alfredo', '0', '107')", "Truncate table Rounds", "insert into Rounds (interview_id, round_id, score) values ('109', '3', '4')", "insert into Rounds (interview_id, round_id, score) values ('101', '2', '8')", "insert into Rounds (interview_id, round_id, score) values ('109', '4', '1')", "insert into Rounds (interview_id, round_id, score) values ('107', '1', '3')", "insert into Rounds (interview_id, round_id, score) values ('104', '3', '6')", "insert into Rounds (interview_id, round_id, score) values ('109', '1', '4')", "insert into Rounds (interview_id, round_id, score) values ('104', '4', '7')", "insert into Rounds (interview_id, round_id, score) values ('104', '1', '2')", "insert into Rounds (interview_id, round_id, score) values ('109', '2', '1')", "insert into Rounds (interview_id, round_id, score) values ('104', '2', '7')", "insert into Rounds (interview_id, round_id, score) values ('107', '2', '3')", "insert into Rounds (interview_id, round_id, score) values ('101', '1', '8')" ], "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.

\"], \"pythondata\": [\"Pandas\", \"

Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0

\"], \"postgresql\": [\"PostgreSQL\", \"

PostgreSQL 16

\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }