LoslegenKostenlos loslegen

Detecting out of range values

Sometimes you can find out of range values in your data. If you don't detect them before analyzing, they can disrupt your results.

The logical operator BETWEEN, and the comparison operators > and <, can help you to detect the rows with out of range values.

The num_ratings column of the series table stores the number of ratings each series has received. The total amount of people surveyed is 5000. However, this column has some out of range values, i.e., there are values greater than 5000 or smaller than 0.

Try to find them!

Diese Übung ist Teil des Kurses

Cleaning Data in SQL Server Databases

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

SELECT * FROM series
-- Detect the out of range values
WHERE ___ ___ ___ 0 AND 5000
Code bearbeiten und ausführen