NULL if the frame contains fewer than N rows.
For more information on usage, please refer to Window Functions.
Syntax
Parameters
Return Type
Same as the input type of<expression>.
Remarks
<n>must be greater than or equal to1. Passing0or a negative value raises an error.- Returns
NULLwhen N exceeds the number of rows in the window frame. - This function respects
NULLvalues, and results will be ordered with default null orderingNULLS LASTunless otherwise specified in theORDER BYclause.
Example
The following example returns the second-lowestmaxpoints value within each leveltype, repeated for every row in that group:
Rows: 10Execution time: 11.07ms