I have a table in SQL Server like this:
Name | age
-----+-------
A | 24
B | 32
C | 25
D | 32
F | 24
G | 32
H | 45
...
How can I add a column that repeats a value n times and then increments 1
Example: (n = 3)
New Column | Name | age
-----------+-------+-------
1 | A | 24
1 | B | 32
1 | C | 25
2 | D | 32
2 | F | 24
2 | G | 32
3 | H | 45
...
Thank you.