Aan de slagGa gratis aan de slag

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?

Deze oefening maakt deel uit van de cursus

Cleaning Data in SQL Server Databases

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

SELECT * FROM series
-- Detect series for adults
WHERE ___ = 1
-- Detect series with the minimum age smaller than 18
AND ___ ___ 18
Code bewerken en uitvoeren