If i have a resultset like this for example (just a list of numbers) :
and I would like to add a grouping column so i can group them per 4 like this : 1,1,1,1,2,2,2,2,3,3,3
(The last one in this examle does not have a forth element, so that is why i cannot use Ntile(3) here.
But I still would like to be able to make a grouping by 4 elements. Is this possible in a easy way ( just like NTile(n)) without to write a bunch of logic ?
Thank you in advance,