lead

fun <T : Any> lead(expr: ColumnDeclaring<T>, offset: Int = 1, defVal: T? = null): WindowFunctionExpression<T>(source)

The lead window function, translated to lead(expr, offset[, defVal]) in SQL.

Return the value of expr from the row that leads (follows) the current row by offset rows within its partition. If there is no such row, the return value is defVal. For example, if offset is 3, the return value is default for the last three rows.

Since

3.6.0