Median salary
hard
What is the median salary of all employees? For an even number of employees it is the average of the two middle salaries. Return one number.
Tables Company
- departmentsid, name, city
- employeesid, name, dept_id, manager_id, title, salary, hire_date, commission
- projectsid, name, dept_id, budget, start_date
- assignmentsemployee_id, project_id, hours
Concepts
- median
- row_number
Run shows your result on the sample data. Submit also runs the query on 2 other sets of data, so it has to be right in general: with ties, missing values (NULL) and rows that have nothing to join to.
Query
CompanyCtrl or Cmd + Enter runs it
Nothing run yet
Press Run to see your result on the sample data and compare it with the expected output. Submit checks it on the other data too.