Write a query to find five highest salaries from EMP table.
(there is a column SALARY)
Answer Posted / sreenivasreddy
SELECT ROWNUM, E1.*
FROM (SELECT EName, Deptno, Sal,
DENSE_RANK()
OVER(ORDER BY Sal DESC) EmpRank
FROM Emp
GROUP BY Deptno, EName, Sal
ORDER BY EmpRank) E1
WHERE E1.EmpRank <= 5
ORDER BY ROWNUM
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
how to enter characters as hex numbers? : Sql dba
what are date and time data types? : Sql dba
define data blocks ? : Sql dba
Can you selectively load only those records that you need? : aql loader
Is a secondary key the same as a foreign key?
What is break?
How do I order columns in sql?
What language is oracle sql developer?
What is loop in pl sql?
What is offset and limit in sql?
Can we create table in function?
what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql
How do I run a program in pl sql?
How to get list of all tables from a database?
What is java sql drivermanager?