Find top Nth employee from each department in terms of
salary?
Answer Posted / akhil saxena
select e1.sal from emp e1 where
n-1 = (select count(distinct(e2.sal)) from emp e2
where e2.sal<e1.sal)
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
You want to implement the one-to-one relationship while designing tables. How would you do it?
what is the system function to get current user's user id? : Sql server database administration
How to test subquery results with the exists operator?
how many no of arguments can be passed in procedures and functions
what is a schema in sql server 2005? : Sql server database administration
How to deploy the Report?
What is sqlservr.exe - process - sql server (sqlex?press)?
Do you think BCNF is better than 2NF & 3NF? Why?
What is msdb database? : SQL Server Architecture
What are the different SQL Server Versions you have worked on?
When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?
What is the use of attributehierarchyvisible ? : sql server analysis services, ssas
What the different components in replication and what is their use?
How many types of subqueries are there in sql server?
Explain cdc and sql injection?