Exercise 3:569.Median Employee Salary
1 Description
The Employee
table holds all employees. The employee table has three columns: Employee Id, Company Name, and Salary.
Write a SQL query to find the median salary of each company. Bonus points if you can solve it without using any built-in SQL functions.
2 Create Table and insert into values
In statistics and probability theory, the median is the value separating the higher half from the lower half of a data sample. The Median is the "middle" of a sorted list of numbers.
This problem requires we find which employee's salary is median and what salary is for each company, NOT calculating the company's median salary.
Last updated