Oh, it is simple!
NTILE() can be used to split the set into equal groups.
SELECT Ratings
,NTILE(2) OVER(ORDER BY Ratings) AS NTILE
FROM RatingsTable
Ratings NTILE
----------- --------------------
1 1
1 1
2 1
2 1
3 1
3 2
3 2
3 2
3 2
3 2
answered
1 year ago
by anonymous