Distributes the rows in an ordered partition into a specified number of groups. The groups are numbered, starting at one. For each row, NTILE returns the number of the group to which the row belongs.
NTILE (integer_expression) OVER ( [ <partition_by_clause> ] < order_by_clause > )
Is a positive integer constant expression that specifies the number of groups into which each partition must be divided. index can be of type int, or bigint.
SELECT NTILE(5) OVER(PARTITION BY [IntColumn] ORDER BY [IntColumn]) AS [ntiled] FROM [IntTable]