how to find nth highest salary
Answer Posted / anonymous
select min(salary) from(
select salary from test
order by salary desc
)
where rownum<4
For ORACLE 8i,9i,10g
select distinct salary from
(select salary,
dense_rank() OVER (PARTITION BY empname ORDER BY salary
desc) rank
from test) where rank=7
;
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How to list all user names in a database?
Define the one-to-one relationship while designing tables.
how to define testing of network layers? : Sql server database administration
How you provide security to cube? : sql server analysis services, ssas
what are database files and filegroups? : Sql server database administration
what is unique and xaml nonclustered index
How to apply filtering criteria at group level with the having clause in ms sql server?
What is service broker?
What is use of attributehierarchyenabled? : sql server analysis services, ssas
What is difference between equi join and inner join?
What are the dis_advantages of stored procedures, triggers, indexes?
How to create a new login name in ms sql server?
Explain the properties of sub-query in sql server?
What is the sql profiler?
What is explicit mode in sql server?