create table test (nu number);
insert into test values(1);
insert into test values(1);
insert into test values(1);
insert into test values(2);
insert into test values(3);
insert into test values(4);
---------------------------------------
select a.*,row_number() over (order by nu) as rn from test a;
NU RN
---------- ----------
1 1
1 2
1 3
2 4
3 5
4 6
select a.*,rank() over (order by nu) as rn from test a;
NU RN
---------- ----------
1 1
1 1
1 1
2 4
3 5
4 6
select a.*,dense_rank() over (order by nu) as rn from test a;
NU RN
---------- ----------
1 1
1 1
1 1
2 2
3 3
4 4