array_agg#

Description#

Returns an array of concatenated input values.

The expression must be a valid expression (not a regex or other type). If no ordering is specified, the default ordering is that of the invoking verb, which is generally the ‘valid_from’ timestamp, ascending.

Return type#

array

Domain#

This is an aggregate function (aggregates rows over a group in aggregate verbs.)

Categories#

Usage#

array_agg(expr, [ order_by ])

Argument

Type

Optional

Repeatable

Restrictions

expr

variant

no

no

none

order_by

ordering

yes

no

constant

Examples#

statsby nicknames:array_agg(nickname, order_by(email)), group_by(uid, fullname)

An array containing all nicknames for each individual in the organization; for users with more than one nickname they will be sorted by email address.