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

Answer Posted / pradeep nambiar

select distinct(a.salary) from employee a where &n=(select
count(distinct(b.salary)) from employee b where
a.salary=b.salary)

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a partition function in sql server?

537


What is xml datatype?

663


What are the differences between “row_number()”, “rank()” and “dense_rank()”?

545


Suppose you want to implement the many-to-many relationships while designing tables. How would you do it?

547


What are the joins in sql server? : sql server database administration

538






Can a rule be bound to any column of any data type?

574


How to delete existing triggers using "drop trigger"?

561


Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.

1429


How will you monitor replication latency in transactional replication? : sql server replication

618


What is a heap?

621


What is the temp table?

547


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?

544


What are triggers in ms sql server?

608


Tell me what are the advantages of using stored procedures?

572


Why use “in” clause in sql server?

560