Skip to content

NTH_VALUE

NTH_VALUE(COLUMN_EXPRESSION, N)

Select the last value in the window or NULL if the window does not have N elements. Uses 1-indexing. Requires N to be a positive integer literal. Supported on all non-semi-structured types.