2022-03-27 18:35:17 +08:00
{
"data" : {
"question" : {
"questionId" : "569" ,
"questionFrontendId" : "569" ,
"boundTopicId" : null ,
"title" : "Median Employee Salary" ,
"titleSlug" : "median-employee-salary" ,
"content" : null ,
"translatedTitle" : null ,
"translatedContent" : null ,
"isPaidOnly" : true ,
"difficulty" : "Hard" ,
2023-12-09 18:42:21 +08:00
"likes" : 315 ,
"dislikes" : 149 ,
2022-03-27 18:35:17 +08:00
"isLiked" : null ,
"similarQuestions" : "[{\"title\": \"Find Median Given Frequency of Numbers\", \"titleSlug\": \"find-median-given-frequency-of-numbers\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]" ,
"exampleTestcases" : "{\"headers\": {\"Employee\": [\"id\", \"company\", \"salary\"]}, \"rows\": {\"Employee\": [[1, \"A\", 2341],[2, \"A\", 341],[3, \"A\", 15],[4, \"A\", 15314],[5, \"A\", 451],[6, \"A\", 513],[7, \"B\", 15],[8, \"B\", 13],[9, \"B\", 1154],[10, \"B\", 1345],[11, \"B\", 1221],[12, \"B\", 234],[13, \"C\", 2345],[14, \"C\", 2645],[15, \"C\", 2645],[16, \"C\", 2652],[17, \"C\", 65]]}}" ,
"categoryTitle" : "Database" ,
"contributors" : [ ] ,
"topicTags" : [
{
"name" : "Database" ,
"slug" : "database" ,
"translatedName" : null ,
"__typename" : "TopicTagNode"
}
] ,
"companyTagStats" : null ,
"codeSnippets" : null ,
2023-12-09 19:57:46 +08:00
"stats" : "{\"totalAccepted\": \"37.4K\", \"totalSubmission\": \"56.6K\", \"totalAcceptedRaw\": 37442, \"totalSubmissionRaw\": 56562, \"acRate\": \"66.2%\"}" ,
2022-03-27 18:35:17 +08:00
"hints" : [
"Still remember how to select the sum which group by one column?" ,
"Try to think about how to get the median from a sorted list." ,
"How to get the median one item for odd number list while how to get the median two items for even number list, try to unify them."
] ,
2023-12-09 18:42:21 +08:00
"solution" : {
"id" : "131" ,
"canSeeDetail" : false ,
"paidOnly" : true ,
"hasVideoSolution" : false ,
"paidOnlyVideo" : true ,
"__typename" : "ArticleNode"
} ,
2022-03-27 18:35:17 +08:00
"status" : null ,
"sampleTestCase" : "{\"headers\": {\"Employee\": [\"id\", \"company\", \"salary\"]}, \"rows\": {\"Employee\": [[1, \"A\", 2341],[2, \"A\", 341],[3, \"A\", 15],[4, \"A\", 15314],[5, \"A\", 451],[6, \"A\", 513],[7, \"B\", 15],[8, \"B\", 13],[9, \"B\", 1154],[10, \"B\", 1345],[11, \"B\", 1221],[12, \"B\", 234],[13, \"C\", 2345],[14, \"C\", 2645],[15, \"C\", 2645],[16, \"C\", 2652],[17, \"C\", 65]]}}" ,
2023-12-09 18:42:21 +08:00
"metaData" : "{\"mysql\": [\"Create table If Not Exists Employee (id int, company varchar(255), salary int)\"], \"mssql\": [\"Create table Employee (id int, company varchar(255), salary int)\"], \"oraclesql\": [\"Create table Employee (id int, company varchar(255), salary int)\"], \"database\": true, \"name\": \"median_employee_salary\", \"pythondata\": [\"Employee = pd.DataFrame([], columns=['id', 'company', 'salary']).astype({'id':'Int64', 'company':'object', 'salary':'Int64'})\"], \"postgresql\": [\"\\nCreate table If Not Exists Employee (id int, company varchar(255), salary int)\"], \"database_schema\": {\"Employee\": {\"id\": \"INT\", \"company\": \"VARCHAR(255)\", \"salary\": \"INT\"}}}" ,
2022-03-27 18:35:17 +08:00
"judgerAvailable" : true ,
"judgeType" : "large" ,
"mysqlSchemas" : [
"Create table If Not Exists Employee (id int, company varchar(255), salary int)" ,
"Truncate table Employee" ,
"insert into Employee (id, company, salary) values ('1', 'A', '2341')" ,
"insert into Employee (id, company, salary) values ('2', 'A', '341')" ,
"insert into Employee (id, company, salary) values ('3', 'A', '15')" ,
"insert into Employee (id, company, salary) values ('4', 'A', '15314')" ,
"insert into Employee (id, company, salary) values ('5', 'A', '451')" ,
"insert into Employee (id, company, salary) values ('6', 'A', '513')" ,
"insert into Employee (id, company, salary) values ('7', 'B', '15')" ,
"insert into Employee (id, company, salary) values ('8', 'B', '13')" ,
"insert into Employee (id, company, salary) values ('9', 'B', '1154')" ,
"insert into Employee (id, company, salary) values ('10', 'B', '1345')" ,
"insert into Employee (id, company, salary) values ('11', 'B', '1221')" ,
"insert into Employee (id, company, salary) values ('12', 'B', '234')" ,
"insert into Employee (id, company, salary) values ('13', 'C', '2345')" ,
"insert into Employee (id, company, salary) values ('14', 'C', '2645')" ,
"insert into Employee (id, company, salary) values ('15', 'C', '2645')" ,
"insert into Employee (id, company, salary) values ('16', 'C', '2652')" ,
"insert into Employee (id, company, salary) values ('17', 'C', '65')"
] ,
"enableRunCode" : true ,
"enableTestMode" : false ,
"enableDebugger" : false ,
2023-12-09 18:42:21 +08:00
"envInfo" : "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"], \"pythondata\": [\"Pandas\", \"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0</p>\"], \"postgresql\": [\"PostgreSQL\", \"<p>PostgreSQL 16</p>\"]}" ,
2022-03-27 18:35:17 +08:00
"libraryUrl" : null ,
"adminUrl" : null ,
"challengeQuestion" : null ,
"__typename" : "QuestionNode"
}
}
}