Skip to main content
Version: Next

last

Takes the last non-null grouped value.

last(xs:list) -> any

Description

The last function returns the last non-null value in xs.

xs: list

The values to search.

Examples

Get the last non-null value

from {x: 1}, {x: 2}, {x: null}
summarize last_value=last(x)
{last_value: 2}

See Also

first