I have thisColumnA ColumnB 100 A 200 A 300 A 500 A 700 B 900 B 450 B 340 B 110 B 220 B
I want to make subGroups of 3 rows, group by Column BSELECT *, ROW_NUMBER OVER(PARTITION BY ColumnB) rowID
It returns me:ColumnA ColumnB RowID 100 A 1 200 A 2 300 A 3 500 A 4 700 B 1 900 B 2 450 B 3 340 B 4 110 B 5 220 B 6
But, i want subgroups of 3 rows, like this:ColumnA ColumnB RowID 100 A 1 200 A 2 300 A 3 500 A 1 700 B 1 900 B 2 450 B 3 340 B 1 110 B 2 220 B 3
So, i Want that it resets every 3 rows in one GroupHow can you do that?