adspace
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
what is dbms? : Sql dba
Is primary key clustered index?
what is collation? : Sql dba
how many tables will create when we create table, what are they? : Sql dba
If a cursor is open, how can we find in a pl/sql block?
What is the current version of sql?
Is inner join faster than left join?
what are aggregate and scalar functions? : Sql dba
Can we rollback truncate?
define sql insert statement ? : Sql dba
Does group by remove duplicates?
Do we need to rebuild index after truncate?
What is your daily office routine?
What is the best sql course?
What is the current version of postgresql?