Introduction
Ranking functions
Selecting n-th row
Revision

Instruction

All right, and now, let us take a look at yet another way of ranking:

SELECT
  name,
  platform,
  editor_rating,
  ROW_NUMBER() OVER(ORDER BY editor_rating)
FROM game;

Let's run the example to see what's different now.

Exercise

Run the third example and see the difference in ranking.

Now, each row gets its own, unique rank number, so even rows with the same value get consecutive numbers.

Console

Code editor

Result

TableConsole