Header Ads Widget

Responsive Advertisement

Ticker

6/recent/ticker-posts

How to find nth highest salary

  Table name : Emloyee_Highest_Salary



select * from Emloyee_Highest_Salary



See the max and min salary of Employee



Here Top 3 salary in descending order.


  How to find the highest salary of employee and all details.

Note: but here salary is duplicate 

select  * from  Emloyee_Highest_Salary where salary =

(select  distinct top 1 salary  from Emloyee_Highest_Salary order by salary desc)



 ðŸ‘‰ find the first highest salary of  Exact result of  employees:

select top 1 * from  Emloyee_Highest_Salary where salary =

(select  distinct top 1 salary  from Emloyee_Highest_Salary order by salary desc)




--------------------------------------------------------------------------Main

1👉 How to find the first highest salary of employee


select top 1 Salary from  

(select  distinct top 1 Salary  from Emloyee_Highest_Salary order by salary desc) as salcol

order by Salary asc


👉How to find the Second highest salary of employee


👉
How to find the 3rd highest salary of employee



Post a Comment

0 Comments