- Overview
- Data types
- Commands
- Functions
- Overview
- Aggregate
- Conditional expression
- Conversion
- Date and time
- Numeric
- String
- Semi-structured data
- Window
- System
On this page
object_agg
Collects key-value pairs into an object.
Syntax
object_agg( <key_expr>, <value_expr> )
Arguments
<key_expr> must be string. NULL keys are skipped.
Returns
Returns object.
Examples
VALUES ('host', 'api-1'), ('region', 'us-east-1')
AGGREGATE object_agg($0, $1);