+ 2
What is the query to find nth highest salary from employee table?
10 ответов
+ 2
i think aggregation function is tobe used...
select max(salary)..
+ 2
simple use select max(salary) from faculty;
+ 2
there is logic required for find second or third maximum salary from table
+ 1
This will work but there might be something simpler :
Select * from (select * from EMPLOYEES order by Salary desc limit 5) order by Salary limit 1
+ 1
I would use something like this:
select salary
from employee
where salary > 0
order by salary desc;
This should give you a list of salaries, largest to smallest.
+ 1
select * from employee order by salary desc limit nth , 1
+ 1
in ques. we hav to find a specific salary...not a list
+ 1
select salary from employ where salary =max
0
selva raj has written the correct answer
0
select * employee
order by salary DESC