What are some examples of aggregate functions?
max(), sum(), min(), every(), count(), json.agg()
What is the purpose of a group by clause?
To separate rows into groups and perform aggregate functions on those groups of rows. Partitions the results by the part you don’t want duplicates of.
What is the rule for select and group by for aggregate functions
Columns from select that are not aggregate functions need to appear in group by unless you can replace that column by a unique id.