OracleWindow FunctionsRANK
ROW_NUMBER

RANKWindow Functions

DENSE_RANK

Assigns the same rank to equal values, with gaps in ranking.

Syntax

RANK() OVER (w)

Example

Enter values below to update the example in real time.

employee_id
total_sales
sales_summary
SELECT employee_id, total_sales,
       RANK() OVER (ORDER BY total_sales DESC) AS rank
FROM sales_summary;