I have a table with a seqno column. I would like to create another column (grpseqno) based on this which is numbered from 1 to 3 only as shown below. It would be neat if this is created by Oracle sql. Thank you in advance.
seqno grpseqno
1 1
2 2
3 3
4 1
5 2
6 3
7 1
I cannot seem to get to cycle from 1 to 3