anyLast
Selects the last encountered value of a column.
By default, the function never returns NULL, i.e. ignores NULL values in the input column.
However, if the function is used with the RESPECT NULLS modifier, it returns the first value reads no matter if NULL or not.
Syntax
Alias anyLast(column) (without RESPECT NULLS)
Aliases for anyLast(column) RESPECT NULLS
anyLastRespectNulls,anyLast_respect_nullslastValueRespectNulls,last_value_respect_nulls
Parameters
column: The column name.
Returned value
- The last value encountered.
Example
Query:
anyLast
Introduced in: v1.1
Selects the last encountered value of a column.
By default, the function never returns NULL, i.e. ignores NULL values in the input column.
However, if the function is used with the RESPECT NULLS modifier, it returns the last value reads no matter if NULL or not.
Syntax
Aliases: last_value
Arguments
column— The column name.Any
Returned value
Returns the last value encountered. Any
Examples
Usage example