Quick Ref.
Functions
date
number
string
Data Types
date
number
string
Compatibility
RANK() OVER (ORDER BY f DESC)
Engine OK Alternative
mysql no
oracle yes
postgres no
sqlserver yes

RANK

RANK() OVER (ORDER BY f DESC) returns the rank position relative to the expression f.

RANK() OVER (ORDER BY f DESC)
In this example we show the ranking, by population of those countries with a population of over 180 million.

Results
See also: