PostgreSQL · Function
jsonb_agg
jsonb_agg collects values from multiple rows into one JSONB array. It includes nulls and supports ordering inside the aggregate call.
Last updated
Syntax
jsonb_agg ( anyelement ORDER BY input_sort_columns ) → jsonbIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
json_aggjsonb_agg_strictjsonb_object_aggto_jsonbcoalesce