Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Aggregate functions

Available aggregates include:

count, sum, avg, min, max,
bool_and, bool_or, string_agg,
var_samp, var_pop, variance,
stddev, stddev_samp, stddev_pop

Signatures are registered by type in sys.function. sum and avg are numeric; count, min, and max also have text and boolean variants where applicable.

SELECT count(*), avg(price), max(name) FROM products;