# NthValue

class NthValue<T>(val expr: ExpressionWithColumnType<T>, val n: ExpressionWithColumnType<Int>) : WindowFunction<T?>

Represents an SQL function that returns expr evaluated at the row that is the n'th row of the window frame (counting from 1); null if no such row

## Constructors

NthValue
Link copied to clipboard
constructor(expr: ExpressionWithColumnType<T>, n: ExpressionWithColumnType<Int>)

## Properties

expr
Link copied to clipboard
val expr: ExpressionWithColumnType<T>

Returns the expression to evaluate.

n
Link copied to clipboard
val n: ExpressionWithColumnType<Int>

Returns the row n to find.

## Functions

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

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.