snowflake.snowpark.functions.lag¶
- snowflake.snowpark.functions.lag(e: ColumnOrName, offset: int = 1, default_value: ColumnOrLiteral | None = None, ignore_nulls: bool = False) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/release-v1.3.0/src/snowflake/snowpark/functions.py#L4712-L4741)¶
Accesses data in a previous row in the same result set without having to join the table to itself.
Example: