RANK determines the rank of one or more of the expression exp within a result set.
Syntax:
RANK(expression...) WITHIN GROUP (ORDER BY expression)
Example:
SELECT RANK(10000) WITHIN GROUP (ORDER BY salary DESC) as RESULT FROM EMP;
RESULT
-------------------
16
Add your comments or share tips on Rank |