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
What operating systems are supported by oracle sql developer?
Are stored procedures faster than queries?
What is faster join or subquery?
What is sql constant?
What are different methods to trace the pl/sql code?
Is sql developer case sensitive?
How do you declare a user-defined exception?
Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?
What are the most important ddl statements in sql?
What is the use of & in pl sql?
Can primary key be changed?
Do we need to create index on primary key?
Can a key be both primary and foreign?
How do you define a foreign key?
What is left join in sql?