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
What are the purposes of floor and sign functions?
Explain primary key?
What is model database in sql server?
What is stored in the mssqlsystemresource database? : sql server database administration
What is stretch database in sql server?
Define synonym?
How to modify an existing stored procedure in ms sql server?
How do I debug a stored procedure in sql server?
What is normalization of database? What are its benefits?
Tell about MOM Tool(Microsoft Operator Manager)?
What is forward - only cursors / read only cursor?
What is co-related sub query?
What is explicit cursors?
What are the features of Embedded SQL
how can you attach more than 20 ldf files in sql server