lead
The value option offset rows later (default 1).
Flags
| Flag | Value |
|---|---|
| Kind | window |
| Nulls | nulls are skipped |
| Deterministic | yes |
| Order matters | yes |
| Decomposable | no |
Example
A pipeline from the language's tested corpus that uses lead, over the example tables.
from orders
window {prev = lag(amount), next2 = lead(amount, offset: 2)} by:{customer} order:{placed}In a plan:
{
"args": [
{
"col": 2
}
],
"fn": "lead",
"options": {
"offset": 2
}
}