api-docs / org.ktorm.dsl / ntile
ntile
fun ntile(n: Int): WindowFunctionExpression<Int>
(source code)The ntile window function, translated to ntile(n)
in SQL.
Divide a partition into n groups (buckets), assigns each row in the partition its bucket number, and return
the bucket number of the current row within its partition. For example, if n is 4, ntile() divides rows into four
buckets. If n is 100, ntile() divides rows into 100 buckets.
Since
3.6.0