api-docs / org.ktorm.dsl / percentRank
percentRank
fun percentRank(): WindowFunctionExpression<Double>
(source code)The percent_rank window function, translated to percent_rank()
in SQL.
Return the percentage of partition values less than the value in the current row, excluding the highest value.
Return values range from 0 to 1 and represent the row relative rank, calculated as the result of this formula,
where rank is the row rank and rows is the number of partition rows: (rank - 1) / (rows - 1)
This function should be used with ORDER BY to sort partition rows into the desired order. Without ORDER BY,
all rows are peers.
Since
3.6.0