A window function that splits the row within the specified
window frame into num-groups number of groups that
each have a roughly equal number of elements.
NTILE splits up the rows in the window
frame into num-groups groups such that each group
contains about the same number of elements. Each group is identified
by a number, starting from one.
A number that specifies how many groups to split the rows into.
The following example splits up employees within each department
into four groups based on their salaries:
SELECT NTILE(4) OVER (PARTITION BY Department ORDER BY Salary) FROM Company.Employee