Introduction
In the previous chapter, you learned how to use SQL to prepare datasets for analysis. Eventually, the purpose of data preparation is to make the data suitable for analysis so that you can make sense of it. Once the data has been prepared, the next step is to analyze it. Generally, data scientists and analytics professionals will try to understand the data by summarizing it and trying to find high-level patterns. SQL can help with this task primarily by using aggregate functions. These functions take multiple rows as input and return new information based on those input rows. To begin, you will learn about aggregate functions.
In this chapter, you will understand the fundamentals of aggregate functions through the following topics:
- Aggregate Functions
- Aggregate Functions with the
GROUP BY
Clause - Aggregate Functions with the
HAVING
Clause - Using Aggregates to Clean Data and Examine Data Quality