Answer Posted / sambu
select r.sal,r.rank,r.dept high from
(select deptno,sal,dense_rank() over (partition by deptno
order by sal desc) rank
from emp) r
where r.rank=3;
The above query gives the following result
DEPTNO SAL HIGHEST
------ ----- -------
10 1300 3
20 1100 3
30 1500 3
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
Is sqlexception checked or unchecked?
What is difference between db2 and sql?
column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.
What is rownum in sql?
How do you get column names only for a table (sql server)?
What is sql constant?
What is sql and also describe types of sql statements?
What are the three pl sql block types?
Is it possible to include an insert statement on the same table to which the trigger is assigned?
What is a temp table?
How would you convert date into julian date format?
How do you rank data in sql?
What is duration in sql profiler trace?
How do you write a subquery?
What is the difference between alter trigger and drop trigger statements?