2nd highest salary in mysql

Solutions on MaxInterview for 2nd highest salary in mysql by the best coders in the world

showing results for - "2nd highest salary in mysql"
Ilan
17 Mar 2018
1#2nd Most highest salary using Limit & Order By
2SELECT Salary FROM (SELECT Salary FROM Employee ORDER BY salary DESC LIMIT 2) AS Emp ORDER BY salary LIMIT 1;
Dounia
02 Jul 2018
1#2nd Most highest salary using dense_rank()
2SELECT sal 
3FROM (SELECT dense_rank() over(ORDER BY sal DESC) AS R, sal FROM emp) employee 
4WHERE R = 2;
Sofia
12 Apr 2017
1#Corelated Subquery
2SELECT Id, Salary
3FROM Employee e
4WHERE 2=(SELECT COUNT(DISTINCT Salary) FROM Employee p
5WHERE e.Salary<=p.Salary)
queries leading to this page
select 2nd highest salary in mysqlmysql second highest salarymysql query for finding second highest salaryhow to find second and third highest salary in mysqlhighest second salary in mysqlhighest third salary in mysqlselect highest salary in mysqlhow to find 2nd highest salary in mysqlget the second highest salary in mysqlmysql third highest salarymysql query 2nd highest salaryfind second highest salary in mysql using ifsecond max salary using havingmysql highest salaryquery for 2nd highest salary in sqlmysql find third highest salarymysql query to get second highest salarysecond highest salary in mysqlquery to find third highest salary in mysqlhow to find 4th highest salary of employee in mysql2nd highest salary in mysql using limitquery to find highest salary in mysqlfinding top2 nd highest salary in sql3rd max salary in mysqlnth highest salary mysqlselect max salary rowsecond highest salary in mysql with limitfind 3rd highest salary in mysqlhow to get highest salary in sqlselect second highest salary in mysqlhow to select 3rd highest salary in mysqlget second highest salary in mysql3 highest salary in mysql2nd highest salary in sql using rank in mysqlmysql statement to get highest salaryselect 3rd highest salary in mysqlmysql find the third highest salarywhat is the query to find second highest salary of employeefind the 3rd highest salary in mysqlhow to find third highest salary in mysqlemployee id salary is given query to get second highest2nd highest salary in mysqlfind the second highest salary in mysqlfind second highest salary in mysqlfind the nth highest salary from table in sqlfind second highest salary in mysql without limitsecond highest salary mysqlmysql query second highest salaryhow to get the second highest salary in mysqlhow to find second last employee salary find in mysqlsecond highest salary in sql using limitnth max salary in mysqlquery to find second highest salary of employee in mysqlquery for nth highest salary in mysqlget fourth highest salary in mysqlselect second highest salary mysqlfind to psecond saleety in sql optimze wayhow to get the third highest salary in mysqlmysql 2nd highest salarytop salary employee mysql queryhow to get second highest salary in mysql5th highest salary in mysqlhow to find the tenth highest salary in mysqlfind the max salary sqlwrite a query to find the second highest salary in the table from mysql 3ffind highest salary in mysqlhow to find the second highest salary from employees salary in mysqlsecond highest salary query in mysqlhow to get 3rd highest salary in mysqlselect max salray from a table mysqlhow to find the second highest salary in mysqlnth highest salary in mysqlmysql query to find second highest salaryget 3rd highest salary in mysqlhow to find last 2nd highest salary in mysqlmysql query to get 3rd highest salarymysql get second highest salaryhow to find second max salary in mysqlhow to find second highest salary in mysql without using subqueryhow to find 3rd highest salary in mysqlsecond lowest salary query in mysql2 sql query like max salary 2c 2nd max salary 2c 3rd max salarymysql query to get third highest salaryfind 2nd highest salary in mysqlselect second max salary in mysqlsecond highest salary in mysql using limitfind nth highest salary in mysqlthird highest salary in mysql3rd highest salary in mysqlhow to find the highest salary in mysqlhow to find second largest salary in sqlhow to get 2nd highest salary in sqlsql get second highest valueselect third highest salary in mysqlsecond largest salary mysqlsecond max salary in mysqlhighest salary in mysqlhow to find highest salary in mysqlhow to get third maximum salary in mysqlhow do you find the 4th highest salary in mysqlget third highest salary in mysqlwhat is display 2nd highest salary in mysqlshallow last second salary in mysqlhow to find max salary in sql using subqueryto find second highest salary in mysqlhow to find nth highest salary in mysql2nd highest salary in mysql