ComeçarComece de graça

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!

Este exercício faz parte do curso

Cleaning Data in SQL Server Databases

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

SELECT * FROM series
-- Detect the out of range values
WHERE ___ ___ ___ 0 AND 5000
Editar e executar o código