July 1st, 2013
NTILE() in Transact-SQL

This function is used to distribute 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. Syntax NTILE (integer_expression) OVER ( [ <partition_by_clause> ] < order_by_clause > ) Arguments integer_expression Is …
0
01
Jul