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 database event trigger?
What is composite data type in pl sql?
why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba
What found sql?
What is difference between left and right outer join?
Does mysql support pl sql?
What is sql partition function?
How to use distinct and count in sql query? Explain
Can I copy :old and :new pseudo-records in/to an oracle stored procedure?
What are sql built in functions?
what is myisam? : Sql dba
Can we call dml statement in function?
What is forward declaration in pl sql?
How to select 10 records from a table?
Is primary key clustered index?