I'm looking to group rows together based on a set value. so I have a query that has 100 rows I would like to group them by every 10 rows and assign a number starting with 1.
So
First 10 rows would be assigned 1, next 10 get 2 next 10 get 3 and so on.
I have tried working this out with row_number, rank etc but not been able to do it.
is this possible?
Cheers Patrick