# PercentRank

class PercentRank(scale: Int = 2) : WindowFunction<BigDecimal>

Represents an SQL function that returns the relative rank of the current row, that is (rank - 1) / (total partition rows - 1). The value thus ranges from 0 to 1 inclusive. scale represents decimal digits count in the fractional part of result.

## Constructors

PercentRank
Link copied to clipboard
constructor(scale: Int = 2)

## Functions

over
Link copied to clipboard
open override fun over(): WindowFunctionDefinition<BigDecimal>

Returns window function definition.

toQueryBuilder
Link copied to clipboard
open override fun toQueryBuilder(queryBuilder: QueryBuilder)

Appends the SQL representation of this function to the specified queryBuilder.