Database & utility
Scalar
to_aggregate_state()
Converts a value into the aggregate state of the aggregate function with the given name and signature. The type of the value must exactly match the state layout of the aggregate function. An optional fourth argument supplies constant parameter values (e.g. string_agg's separator) as a list with one entry per argument, using NULL for arguments that are not bound to a constant.
Reference: DuckDB 2.0.0
Arguments & returns
3 overloadsto_aggregate_state(data, name, signature)
Scalar
| Overload link | data | name | signature |
Returns |
|---|---|---|---|---|
| #01 | ANY | VARCHAR | ANY[] |
ANY |
to_aggregate_state(data, name, signature, constant_parameters)
Scalar
| Overload link | data | name | signature | constant_parameters |
Returns |
|---|---|---|---|---|---|
| #02 | ANY | VARCHAR | ANY[] | ANY |
ANY |
to_aggregate_state(data, name, signature, constant_parameters, order_by)
Scalar
| Overload link | data | name | signature | constant_parameters | order_by |
Returns |
|---|---|---|---|---|---|---|
| #03 | ANY | VARCHAR | ANY[] | ANY | ANY |
ANY |
Example
Haybarn WASM 2.0.0-rc12 · In your browser
Engine example · Run to view results.