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 is a trigger in sql?
Are stored procedures faster than dynamic sql?
What are the different types of sql commands?
What is fmtonly in sql?
What is crud sql?
What is mdf ldf and ndf?
how many tables will create when we create table, what are they? : Sql dba
Does postgresql run on the cloud?
When is the explicit cursor used ?
Do ddl statements need commit?
How do you bind variables in pl sql?
What are sql*plus environment variables?
What is clustered index sql?
What does 0 mean in sql?
Why is a primary key important?