@Priya_devipalla

select salary from Employee order by salary DESC LIMIT 1 OFFSET N*;

@vijaygupta7066

This works only if we have a unique salary...  The best way to solve this kind of problem is to always use the dense_rank advance window function sql query logic.

@PICTOROBO

SELECT salary 
FROM Employee 
ORDER BY Salary DESC LIMIT (Nth,1)

@adi4178

We can write select distinct (salary) from Employee order by salary desc limit 2,1

@subamsarkar_

WITH CTE AS
(
SELECT *,
DENSE RANK() OVER ( ORDER BY salary DESC) as Rank
FROM employee 
)
SELECT *
FROM CTE
WHERE Rank = N;

@vineetkarmakar

With cte as (Select *, 
Dense_rank() over(order by salary desc) as rank_)
Select eid, salary
From cte 
Rank_ = N

@indra_Shorts1

Select salary from employees
Order by salary Desc
Offset 2, limit 1;

@anuragshukla6256

Select * from emp order by salary desc limit 1 offset n

@sphinxgaming2002

Select E1.salary from employees E1 where N-1 in (select count(distinct E2.salary) from employees E2 where E1.salary < E2.salary); 
In this question the N value will be 3.

@tusharrj6578

Using MS server we write using derived table concept,

Select top1 A.sal from (Select top 3 sal from employee order by sal desc)as A order by A.sal asc

@gowrinarayanan3842

Select salary from employee order by salary desc limit 1 offset 2;

@Beingbasu

SELECT Salary
FROM (
    SELECT Salary, DENSE_RANK() OVER (ORDER BY Salary DESC) AS rank
    FROM Employees
) ranking_salaries
WHERE rank = 3;

@lakshgaming696

Use limit 2 , offset 1 at last

@poisondart_music

Standard leetcode question

@karthiksurvepalli5695

I don’t find 2nd session , post both question and answers so that helps viewers and you too to gain subscribers 👍

@DayanandaBNarayana

why no one talking about 
Window function Nthvalue?

Select 
   NTH_Value(salary,3) over(Order by Salary DESC) as 3rd_highiest
from Employees.

Any thoughts?

@eddybear9436

Ye MySQL ke liye theek hai. Oracle ke liye dense rank use krna pdega.

@pranalijagtap4004

Select DISTINCT(salary) from Employees ORDER BY salary DESC LIMIT 2,1

@shubhamtawade3010

We can also use Inline Subquery for this
SELECT SALARY
FROM (SELECT ROWNUM AS SRNO,SALARY
FROM(SELECT DISTINCT SALARY
FROM Employees)
ORDER BY SALARY DESC))
WHERE SRNO IN (3);

@rohitsingh-sz8wz

Select eid, name, deptid, salary, age from employees order by salary desc limit 1 offset 2;