There are 1100 records in a table. I would like to divide the 1100 by equal groups and would like to apply random numbers(1-100 ) equally for each group. I am able to assign the random numbers to the records but not equally by group wise CREATE table test_2 as SELECT email, round(dbms_random.value(1,100)) RandomNumber FROM test2 t select count(*),randomnumber from test2 group by randomnumber Can you please suggest Example : 1100 records by group wise means 11 sets and each 11 sets of records should be assigned randomnumbers (1-100) Thanks