SQL
Aggregate Functions
Learn how to perform calculations on a set of values.
By TechCoder TeamLast updated: 2026-06-02
In a Nutshell
Learn how to perform calculations on a set of values. This hands-on tutorial focuses on practical implementation of aggregate functions concepts.
What are Aggregate Functions?
Aggregate functions perform a calculation on a set of values and return a single value. They are often used with the GROUP BY clause.
Common aggregate functions:
COUNT(): Returns the number of rows.SUM(): Returns the total sum of a numeric column.AVG(): Returns the average value of a numeric column.MIN(): Returns the smallest value.MAX(): Returns the largest value.
Example: COUNT
Count the total number of products.
Example: SUM and AVG
Calculate the total price of all products and the average price.
Example: MIN and MAX
Find the cheapest and most expensive product prices.