nth highest salary

Solutions on MaxInterview for nth highest salary by the best coders in the world

showing results for - "nth highest salary"
Angela
16 Apr 2017
1#Method 1
2SELECT salary FROM Employee ORDER BY salary DESC LIMIT N-1, 1
3
4#Method 2
5SELECT salary FROM Employee AS e1 
6WHERE n-1=(SELECT COUNT(DISTINCT,salary) FROM Employee AS e2 
7           WHERE e2.salary>e1.salary)
Mylan
08 Mar 2019
1SELECT MIN(EmpSalary) from ( 
2	SELECT EmpSalary from Employee ORDER BY EmpSalary DESC LIMIT 3 
3);
Olivia
21 Sep 2020
1SELECT salary FROM Employee ORDER BY salary DESC LIMIT N-1, 1
queries leading to this page
mysql query to find nth highest salaryhow to print nth highest salary in sql3rd highest salary in sql serversecond highest salary fastestfind the nth highest salary in sqlquery to select the 5th largest salary from the employee tablewrite a query to find the nth highest salary from the table without using top 2flimit keyword second highest salary in sql using maxget nth highest salary in sqltable row number 6 highest salaryquery for 5th highest salary in sql without using top or limit method 3 largest salary in sqlselect 3rd highest salary in sqlhow to get nth highest salary in sql4th highest salary in sql using limitn highest salary sqlmysql nth highest salary sql query to display 2nd highest salaried employee details and may ask for nth highestdetermine the 5th highest salary without using top or limit method thirdhighest salary in sqlsql query to find 3rd highest salaryselect top 2nd highest salary for sqlfind 3rd highest salary in sql 3a find 5th largest salary in a given salary table 3rd height salary sqlwrite an sql query to determine the 5th highest salary without using top or limit methodnth highest salaryn highest salary in sqlselect highest salary in sqltop 3rd salary in mysqlhighest salary in sqlhow to find 10th highest salary in postgresqlretrive the 5th heighest salary in sqlnth largest number sql queryquery to find 5th highest salary in sqlnth salary in sql server9th max salary from sqlhow to find nth highest salarywrite a query to determine the nth 28say n 3d5 29 highest purch amt from orders table write a sql query to find the 4th maximum element from a tableselect 5th highest salary in sqlselect second highest salary in sql without using limithow to get 5th highest salary in sql serverfind 5th highest salary in sqlsql highest salary3rd highest salary in sqlquery for 5th highest salary in sql without using top or limit methodfind nth highest salary of an employeeget highest salary in sqlselect 10th highest salary sql4th maximum salary using subqueryhow to find 3rd highest salary in sqlselect third max salary in sqlhow to find fifth s highest salary in sqlsql query to fetch 3rd highest salarywrite a sql query to find employee with third highest salary 2c without using top or inner querynth maximum salary in sqlnth highest salary in sql3rd highest salary in sqlthird hightest sql logicsecond highest salary in sqln highest salary in sql in big query salary from worker order by salary desc limit n 1 2c1 3b how this worksnth highest salary in mysqlfind out the highest salary in sqlset the nth highest salary in sqlsecond highest salary in sql using limit4th maximum salary in sqlget nth salary sql serverhow to get fifth highest salary in sqlthird max salary in sqlhow to find nth highest salary in sqlcalculate nth highest salary sqlwrite a query to find the 4th maximum salary in the employees tablesql queries for highest salarysecond highest salary sqlhow to find 5th highest from sqlnth highest salary in sql using correlated subquerythird highest salary in sqlsql query for nth highest salarywrite sql query to get third highest salary from employee tablesql query for third highest salary3rd salary in sql secons hiest salary in sql without limit4 highest salary in sql3rd max salaary sqlselect nth highest salary in sqlkth largest salary in sqln highest salary in mysql using correlated subqueryfind the third highest salary in sqlsql query 3 highest salarylist the highest salary in sqlget 6th largest in sqllowest salary in sql3rd higest sql querydetermine the 5th highest salary without using top or limit method for workernth salary in sql3rd max salary in sqlsql query to find 5th highest salaryget top 3 highest salary in sql without window functionwrite a query to find nth highest salarywrite an sql query to find the nth highest salary from table ans 2c using top keyword 28sql server 29 select 5th highest salary in sql servergiven an employee table 2c find the e id and e name of the employee with the third highest salaryhow to find nth salary in sqlsecond highest salary in teradata2nd hioghest salary using rank functioncorrelated subquery to find nth highest salarysql get 3rd highest salaryhow would you find the 10th highest employee salary in the employee table 3fn m sqlwrite an sql query to determine the 5th highest salary without using top or limit method 2nd height salary sqlnth highest salary in oracle5th highest salary sql server query3rd highest salary sql queryfind the n highest salary in sqlsecond highest salary in sql using rankgetting n max salary in sqlselect esal from emp order by esal desc limit 1 2c1get n highest salary sqlnth highest salary in sqlselect 5th highest salary in mysqlhighest salary sql queryget kth largest element sql dense rankfind 2nd rank in sqlselect nth highest salaryfinding nth highest salary in sqlsql highest ntfind third max salary in sqlmysql third highest salaryquery to find nth highest salarycalculate 3rd highest salary sqlhow to select highest salary in sqlhow to pull 3rd maximum record sqlsql select highest salaryn highest salary in mysql write an sql query to determine the 5th highest salary without using top or limit method sql query to find the person with the third highest salarysql nth highest salarydetermine the 5th highest salary without using top or limit method10th highest salary in sqlwrite a sql query to get the nth highest salary from the employee table write a sql query to get the third highest salary of an employee from employee table 3frite a sql query to get the nth highest salary from the employee table how to find highest average in sqlhow to get highest salary in sqlhow to find 10th highest salary in sqlfind 3rd maximum salary in sqlquery for 5th highest salary in sql without using top or limit method in sqlselect n highest salary in sqlhow to find the 3rd highest salary in sqlnth highest salary