Answer Posted / venkateswara thiruvedhula
SELECT empno,
deptno,
sal,
RANK() OVER (PARTITION BY deptno ORDER BY sal
desc) "rank"
FROM emp;
EMPNO DEPTNO SAL rank
---------- ---------- ---------- ----------
7934 10 5000 1
7782 10 3000 2
7839 10 2000 3
7369 20 2950 1
7876 20 1700 2
7566 20 1100 3
7788 20 900 4
7902 20 900 4
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain the difference between triggers and constraints?
How does sql developer connect to oracle database?
How do I find duplicates in the same column?
What is the difference between sql and isql*plus?
What is pl/sql language case sensitive?
How are sql commands classified?
How do you modify a trigger?
what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba
What is pl sql block in dbms?
How to order siblings in oracle hierarchy queries?
What steps server process has to take to execute an update statement?
Is sqlexception checked or unchecked?
Explain character-manipulation functions?
Is sql harder than python?
What is union and union all keyword in sql?