NTILE() Function in SQL Server
The NTILE() function in SQL server is used to distribute rows of an ordered partition into a specified number of approximately equal groups, or buckets.
It assigns each group a number_expression ranging from one. NTILE() function assigns a number_expression for every row in a group, to which the row belongs.
SQL Server NTILE() Function
SQL NTILE() function is a window function that distributes rows of an ordered partition into a pre-defined number of roughly equal groups.