Aggregate Function Reference
Aggregate functions combine several input rows into one result. See the overview for NULL handling and aggregate modifiers, or follow an individual function for its syntax, result type, and examples.
Counting, totals, and extrema
Conditional aggregates
Statistics
stddev_popstddev_sampvar_popvar_sampcovar_popcovar_sampcorrregr_avgxregr_avgyregr_countregr_interceptregr_r2regr_sloperegr_sxxregr_sxyregr_syymodepercentile_contpercentile_disc
Boolean and bitwise aggregates
Arrays and strings
JSON aggregates
json_aggjson_agg_strictjson_group_arrayjson_group_objectjson_object_aggjson_object_agg_strictjson_object_agg_uniquejson_object_agg_unique_strictjsonb_aggjsonb_agg_strictjsonb_object_aggjsonb_object_agg_strictjsonb_object_agg_uniquejsonb_object_agg_unique_strict