SQL Tutorial
- Basic SQL 
- Intermediate SQL - Putting it together 
- SQL Aggregate Functions 
- SQL COUNT 
- SQL SUM 
- SQL MIN/MAX 
- SQL AVG 
- SQL GROUP BY 
- SQL HAVING 
- SQL CASE 
- SQL DISTINCT 
- SQL Joins 
- SQL INNER JOIN 
- SQL Outer Joins 
- SQL LEFT JOIN 
- SQL RIGHT JOIN 
- SQL Joins Using WHERE or ON 
- SQL FULL OUTER JOIN 
- SQL UNION 
- SQL Joins with Comparison Operators 
- SQL Joins on Multiple Keys 
- SQL Self Joins 
 
- Advanced SQL 
- SQL Analytics Training 
Python Tutorial
Learn Python for business analysis using real-world data. No coding experience necessary.
Start Now
Mode Studio
The Collaborative Data Science Platform
SQL Aggregate Functions
Aggregate functions in SQL
As the Basic SQL Tutorial points out, SQL is excellent at aggregating data the way you might in a pivot table in Excel. You will use aggregate functions all the time, so it's important to get comfortable with them. The functions themselves are the same ones you will find in Excel or any other analytics program. We'll cover them individually in the next few lessons. Here's a quick preview:
- COUNTcounts how many rows are in a particular column.
- SUMadds together all the values in a particular column.
- MINand- MAXreturn the lowest and highest values in a particular column, respectively.
- AVGcalculates the average of a group of selected values.
The Basic SQL Tutorial also pointed out that arithmetic operators only perform operations across rows. Aggregate functions are used to perform operations across entire columns (which could include millions of rows of data or more).
Next Lesson
SQL COUNT