Find top Nth employee from each department in terms of
salary?

Answer Posted / rakhi

Select Salary From [TableNAme] WHERE Salary IN(Select Top
Nth Salary From [TableName] ORDER BY Salary DESC) ORDER BY
DESC

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what is sql service broker?

530


How to create a simple user defined function in ms sql server?

541


What are the default system databases in sql server 2000?

536


What is reference section?

495


What are the new features are introduced in sql server 2012 reporting services?

105






How to delete a database in ms sql server?

557


as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration

532


Explain timestamp datatype?

552


What is a join in sql? What are the types of joins?

519


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

521


How to create view in stored procedure sql server?

501


What is difference between global temporary tables and local temporary tables?

658


John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?

527


what is an index? : Sql server database administration

518


What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas

593