- lag(value any>
+ lag(value anyelement>
[, offset integer>
- [, default any> ]])
+ [, default anyelement> ]])
returns value evaluated at
the row that is offset
rows before the current row within the partition; if there is no such
- row, instead return default.
+ row, instead return default
+ (which must be of the same type as
+ value).
Both offset and
default are evaluated
with respect to the current row. If omitted,
- lead(value any>
+ lead(value anyelement>
[, offset integer>
- [, default any> ]])
+ [, default anyelement> ]])
returns value evaluated at
the row that is offset
rows after the current row within the partition; if there is no such
- row, instead return default.
+ row, instead return default
+ (which must be of the same type as
+ value).
Both offset and
default are evaluated
with respect to the current row. If omitted,