Google News
logo
PostgreSQL - Interview Questions
What Are Aggregate Functions?
In PostgreSQL, aggregate functions perform a calculation over multiple rows and return one value. As mentioned previously, aggregate functions are often used alongside the GROUP BY clause, but there are many possible uses for these functions.
 
There are five aggregate functions in SQL :
 
COUNT() : Returns the number of rows that fit the criteria stated in the WHERE clause.

SUM() : Calculates the total of all values in a column or an expression.

AVG() : Calculates the average column value.

MIN() : Returns the smallest value from a set.

MAX() : Returns the largest value from a set.
Advertisement