array_agg(expr: storable, [order_by(...)]?) -> generic array

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.

Domain

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

Categories

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.