Query : Third Highest Employee Salary
select min(EmpSalary) from Employee where EmpSalary IN
(select Top 3 EmpSalary from Employee order by EmpSalary desc)
Query : Third Smallest Employee Salary
select max(EmpSalary) from Employee where EmpSalary IN
(select Top 3 EmpSalary from Employee order by EmpSalary asc)
select min(EmpSalary) from Employee where EmpSalary IN
(select Top 3 EmpSalary from Employee order by EmpSalary desc)
Query : Third Smallest Employee Salary
select max(EmpSalary) from Employee where EmpSalary IN
(select Top 3 EmpSalary from Employee order by EmpSalary asc)
No comments:
Post a Comment