From the course: SQL for Exploratory Data Analysis Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Types of quality checks

Types of quality checks - PostgreSQL Tutorial

From the course: SQL for Exploratory Data Analysis Essential Training

Start my 1-month free trial

Types of quality checks

- [Instructor] Let's look at types of data quality checks. There are two types of data quality checks we should apply. Missing or invalid data checks and inconsistent data checks. Let's start with missing or invalid data. The first check is simple. It looks for columns with missing values. We can do this with a select command, such as SELECT * FROM store_sales WHERE units_sold IS NULL We should also check for values that are in range of what we expect. Business rules and knowledge of the world are needed here. For example, if we had an age column, we should check to make sure that all ages are greater than zero and less than 120. In other cases, we want to use information about the business to find valid ranges of values. For example, if there are at most 10 employees on a shift at any time, we could verify that the number of employees on a shift is not greater than 10. We could also use a lower bound check to make sure that values are not less than zero too. Now let's consider…

Contents