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 provide default values to stored procedure parameters?
Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?
when would you go for denormalization? : Sql server database administration
What is the rdl file?
What is lock escalation and what is its purpose?
What are synonyms?
What do you mean by an execution plan? Why is it used? How would you view it?
How do you delete a trigger?
how can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role? : Sql server administration
can SSRS reports Cache results?
List out some of the requirements to set up a sql server failover cluster?
You schedule a job to run every minute what will happen if the first job runs more than 1 min? Will the second instance of the job start?
If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?
How to enter unicode character string literals in ms sql server?