Aggregates
Aggregate
lead()
Arguments & returns
lead(col0, col1, col2)
Aggregate
| Overload link | col0 | col1 | col2 |
Returns |
|---|---|---|---|---|
| #01 | T | BIGINT | T |
T |
Example
Haybarn WASM 1.5.5-rc3 · In your browser
Guide example · Run to view results.
In other engines
ClickHouselead()
SELECT lead(salary, 1, 0) OVER (ORDER BY hire_date) AS prev_sal FROM employees
SELECT LEAD(salary, 1, 0) OVER (ORDER BY hire_date) AS prev_sal FROM employees