{ "data": { "question": { "questionId": "3549", "questionFrontendId": "3236", "categoryTitle": "Database", "boundTopicId": 2861886, "title": "CEO Subordinate Hierarchy", "titleSlug": "ceo-subordinate-hierarchy", "content": null, "translatedTitle": "首席执行官下属层级", "translatedContent": null, "isPaidOnly": true, "difficulty": "Hard", "likes": 0, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"45\", \"totalSubmission\": \"57\", \"totalAcceptedRaw\": 45, \"totalSubmissionRaw\": 57, \"acRate\": \"78.9%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Employees\":[\"employee_id\",\"employee_name\",\"manager_id\",\"salary\"]},\"rows\":{\"Employees\":[[1,\"Alice\",null,150000],[2,\"Bob\",1,120000],[3,\"Charlie\",1,110000],[4,\"David\",2,105000],[5,\"Eve\",2,100000],[6,\"Frank\",3,95000],[7,\"Grace\",3,98000],[8,\"Helen\",5,90000]]}}", "metaData": "{\"mysql\":[\"Create table if not exists employees(employee_id int, employee_name varchar(100), manager_id int, salary int)\"],\"mssql\":[\"Create table employees(employee_id int, employee_name varchar(100), manager_id int, salary int)\"],\"oraclesql\":[\"Create table employees(employee_id NUMBER, employee_name varchar2(100), manager_id NUMBER, salary NUMBER)\"],\"database\":true,\"name\":\"find_subordinates\",\"manual\":false,\"postgresql\":[\"CREATE TABLE IF NOT EXISTS employees (\\n employee_id INT,\\n employee_name VARCHAR(100),\\n manager_id INT,\\n salary INT\\n);\\n\"],\"pythondata\":[\"Employees = pd.DataFrame(columns=['employee_id', 'employee_name', 'manager_id', 'salary']).astype({\\n 'employee_id': pd.Int64Dtype(),\\n 'employee_name': 'str',\\n 'manager_id': pd.Int64Dtype(),\\n 'salary': pd.Int64Dtype()\\n})\"],\"database_schema\":{\"employees\":{\"employee_id\":\"INT\",\"employee_name\":\"VARCHAR(100)\",\"manager_id\":\"INT\",\"salary\":\"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table if not exists employees(employee_id int, employee_name varchar(100), manager_id int, salary int)", "Truncate table Employees", "insert into Employees (employee_id, employee_name, manager_id, salary) values ('1', 'Alice', 'None', '150000')", "insert into Employees (employee_id, employee_name, manager_id, salary) values ('2', 'Bob', '1', '120000')", "insert into Employees (employee_id, employee_name, manager_id, salary) values ('3', 'Charlie', '1', '110000')", "insert into Employees (employee_id, employee_name, manager_id, salary) values ('4', 'David', '2', '105000')", "insert into Employees (employee_id, employee_name, manager_id, salary) values ('5', 'Eve', '2', '100000')", "insert into Employees (employee_id, employee_name, manager_id, salary) values ('6', 'Frank', '3', '95000')", "insert into Employees (employee_id, employee_name, manager_id, salary) values ('7', 'Grace', '3', '98000')", "insert into Employees (employee_id, employee_name, manager_id, salary) values ('8', 'Helen', '5', '90000')" ], "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\":{\"Employees\":[\"employee_id\",\"employee_name\",\"manager_id\",\"salary\"]},\"rows\":{\"Employees\":[[1,\"Alice\",null,150000],[2,\"Bob\",1,120000],[3,\"Charlie\",1,110000],[4,\"David\",2,105000],[5,\"Eve\",2,100000],[6,\"Frank\",3,95000],[7,\"Grace\",3,98000],[8,\"Helen\",5,90000]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"