Skip to main content
Returns a value evaluated at the row that is offset rows after the current row within the ordered frame. This function is similar to leadInFrame, but always reads the whole partition; a window frame, if specified, is ignored. Syntax
For more detail on window function syntax see: Window Functions - Syntax. Parameters
  • x — Column name.
  • offset — Offset to apply. (U)Int*. (Optional - 1 by default).
  • default — Value to return if calculated row exceeds the boundaries of the window frame. (Optional - default value of column type when omitted).
Returned value
  • value evaluated at the row that is offset rows after the current row within the ordered frame.
Example This example looks at historical data for Nobel Prize winners and uses the lead function to return a list of successive winners in the physics category.
Query
Query
Query