Aggregates
Aggregate
lead()
Arguments & returns
lead(col0, col1, col2)
Aggregate
| Overload link | col0 | col1 | col2 |
Returns |
|---|---|---|---|---|
| #01 | T | BIGINT | T |
T |
Example
1 more ↓Haybarn WASM 2.0.0-rc11 · In your browser
Engine example with sample data · Run to view results.
More examples
Haybarn WASM 2.0.0-rc11 · 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