No Parameters
Returns: decimal
Example
query:
SELECT playerid, HR, RANK() OVER ( ORDER BY HR DESC)
FROM batting
WHERE yearId = 2000
ORDER BY HR DESC, playerid
result:
playerid | HR | rank |
---|---|---|
sosasa01 | 50 | 1 |
bondsba01 | 49 | 2 |
bagweje01 | 47 | 3 |
glaustr01 | 47 | 3 |
guerrvl01 | 44 | 5 |
hidalri01 | 44 | 5 |
giambja01 | 43 | 7 |
sheffga01 | 43 | 7 |
thomafr04 | 43 | 7 |
edmonji01 | 42 | 10 |
heltoto01 | 42 | 10 |
batisto01 | 41 | 12 |
delgaca01 | 41 | 12 |
rodrial01 | 41 | 12 |
griffke02 | 40 | 15 |
palmera01 | 39 | 16 |
piazzmi01 | 38 | 17 |
ramirma02 | 38 | 17 |
martied01 | 37 | 19 |
thomeji01 | 37 | 19 |