Detecting and excluding inaccurate data
In this lesson, you also learned that if you don't detect inaccurate data before analyzing, this data can disrupt your results.
The series
table has a boolean column named is_adult
, that stores whether the series is for adults or not. There is also another column, min_age
, that stores the minimum age the audience should have. Unfortunately, there are contradictory values, because some rows with a TRUE
value in its is_adult
column have a number smaller than 18 in its min_age
column.
Can you find these rows with inaccurate data?
Cet exercice fait partie du cours
Cleaning Data in SQL Server Databases
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
SELECT * FROM series
-- Detect series for adults
WHERE ___ = 1
-- Detect series with the minimum age smaller than 18
AND ___ ___ 18