- Overview
- Data types
- Commands
- Functions
- Overview
- Aggregate
- Conditional expression
- Conversion
- Date and time
- Numeric
- String
- Semi-structured data
- Window
- System
On this page
last, last_value
Returns the last input value.
Syntax
last( <expr> )
last_value( <expr> )
last returns the last value, including NULL. last_value returns the last non-NULL value.
Examples
VALUES ('a'), ('b'), (NULL)
AGGREGATE last($0), last_value($0);