how to find nth highest salary

Answer Posted / kiran k s

select distinct(salary) from table t1
where 4=(select count(distinct(salary))from table t2
where t2.salary >= t1.salary);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to change the ownership of a schema in ms sql server?

563


Explain Geometry datatype in sql server 2008 with example

594


What is enhanced database mirroring in sql server 2008?

519


How to edit table in sql server 2017?

514


You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?

551






What is sqlservr.exe - process - sql server (sqlex?press)?

604


Name few endpoints exposed by ssrs 2012?

305


What the different components of Replication and what is their use?

563


How to create new table with "create table" statements?

563


Can group by and orderby be used together?

597


What are parameterized reports? What are cascading parameters in ssrs reports?

100


What is difference between drop truncate and delete?

558


How to modify the underlying query of an existing view?

541


What is normalization? Explain its different types?

606


What are three ways you can use an identity value inside a trigger? Why would you prefer one way over another?

550