{ "data": { "question": { "questionId": "2152", "questionFrontendId": "2004", "categoryTitle": "Database", "boundTopicId": 994845, "title": "The Number of Seniors and Juniors to Join the Company", "titleSlug": "the-number-of-seniors-and-juniors-to-join-the-company", "content": null, "translatedTitle": "职员招聘人数", "translatedContent": null, "isPaidOnly": true, "difficulty": "Hard", "likes": 9, "dislikes": 0, "isLiked": null, "similarQuestions": "[{\"title\": \"Last Person to Fit in the Bus\", \"titleSlug\": \"last-person-to-fit-in-the-bus\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u6700\\u540e\\u4e00\\u4e2a\\u80fd\\u8fdb\\u5165\\u5df4\\u58eb\\u7684\\u4eba\", \"isPaidOnly\": false}, {\"title\": \"The Number of Seniors and Juniors to Join the Company II\", \"titleSlug\": \"the-number-of-seniors-and-juniors-to-join-the-company-ii\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u804c\\u5458\\u62db\\u8058\\u4eba\\u6570 II\", \"isPaidOnly\": true}]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"2.2K\", \"totalSubmission\": \"4.8K\", \"totalAcceptedRaw\": 2181, \"totalSubmissionRaw\": 4800, \"acRate\": \"45.4%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Candidates\":[\"employee_id\",\"experience\",\"salary\"]},\"rows\":{\"Candidates\":[[1,\"Junior\",10000],[9,\"Junior\",10000],[2,\"Senior\",20000],[11,\"Senior\",20000],[13,\"Senior\",50000],[4,\"Junior\",40000]]}}", "metaData": "{\"mysql\":[\"Create table If Not Exists Candidates (employee_id int, experience ENUM('Senior', 'Junior'), salary int)\"],\"mssql\":[\"Create table Candidates (employee_id int, experience VARCHAR(6) NOT NULL CHECK (experience IN ('Senior', 'Junior')), salary int)\"],\"oraclesql\":[\"Create table Candidates (employee_id int, experience VARCHAR(6) NOT NULL CHECK (experience IN ('Senior', 'Junior')), salary int)\"],\"database\":true,\"name\":\"count_seniors_and_juniors\",\"pythondata\":[\"Candidates = pd.DataFrame([], columns=['employee_id', 'experience', 'salary']).astype({'employee_id':'Int64', 'experience':'object', 'salary':'Int64'})\"],\"postgresql\":[\"Create table If Not Exists Candidates (employee_id int, experience VARCHAR(30) CHECK (experience IN ('Senior', 'Junior')), salary int)\\n\"],\"database_schema\":{\"Candidates\":{\"employee_id\":\"INT\",\"experience\":\"ENUM('Senior', 'Junior')\",\"salary\":\"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Candidates (employee_id int, experience ENUM('Senior', 'Junior'), salary int)", "Truncate table Candidates", "insert into Candidates (employee_id, experience, salary) values ('1', 'Junior', '10000')", "insert into Candidates (employee_id, experience, salary) values ('9', 'Junior', '10000')", "insert into Candidates (employee_id, experience, salary) values ('2', 'Senior', '20000')", "insert into Candidates (employee_id, experience, salary) values ('11', 'Senior', '20000')", "insert into Candidates (employee_id, experience, salary) values ('13', 'Senior', '50000')", "insert into Candidates (employee_id, experience, salary) values ('4', 'Junior', '40000')" ], "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.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"

PostgreSQL 16<\\/p>\"]}", "book": null, "isSubscribed": false, "isDailyQuestion": false, "dailyRecordStatus": null, "editorType": "CKEDITOR", "ugcQuestionId": null, "style": "LEETCODE", "exampleTestcases": "{\"headers\":{\"Candidates\":[\"employee_id\",\"experience\",\"salary\"]},\"rows\":{\"Candidates\":[[1,\"Junior\",10000],[9,\"Junior\",10000],[2,\"Senior\",20000],[11,\"Senior\",20000],[13,\"Senior\",50000],[4,\"Junior\",40000]]}}\n{\"headers\":{\"Candidates\":[\"employee_id\",\"experience\",\"salary\"]},\"rows\":{\"Candidates\":[[1,\"Junior\",10000],[9,\"Junior\",10000],[2,\"Senior\",80000],[11,\"Senior\",80000],[13,\"Senior\",80000],[4,\"Junior\",40000]]}}", "__typename": "QuestionNode" } } }