Syntax
Parameters
Return Type
INTEGER/BIGINT
If there is a remainder after dividing the rows in a partition by the argument value, it will result in buckets of different sizes. For example,
NTILE(2)over 5 rows will result in 2 buckets, the first with 3 rows, the second with 2NTILE(3)over 5 rows results in 3 buckets, the first 2 with 2 rows each and the last with one.