Applies to: Databricks SQL Databricks Runtime
Returns the value at a specific
offset in the window.
expr: An expression of any type.
offset: An INTEGER literal greater than 0.
RESPECT NULLS: When
IGNORE NULLSis used, any
exprvalue that is NULL is ignored in the count. The default is
The result type matches the
The window function returns the value of
expr at the row that is the
offsetth row from the beginning of the window frame.
If there is no such
offsetth row, returns
You must use the ORDER BY clause clause with this function. If the order is non-unique, the result is non-deterministic.