Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
SQL> select id , row_number() over(order by id) as row_number, rank() over(order by id) as rank,dense_rank() over (order by id) as dense_rank from a;
ID ROW_NUMBER RANK DENSE_RANK
---------- ---------- ---------- ----------
1 1 1 1
1 2 1 1
2 3 3 2
3 4 4 3
3 5 4 3
4 6 6 4
4 7 6 4
5 8 8 5
6 9 9 6
7 10 10 7