Get startedGet started for free

WHERE AND

Filtering your records is already a good way of getting a more exact view on your data, but often, you'll want to select data from your tables based on multiple conditions.

As you saw in the beginning of this chapter, you can build up your WHERE queries by combining multiple conditions with the AND keyword.

For example, the query

SELECT *
FROM clients
WHERE age > 40 
AND education = 'university degree';

gives you a result set with all details from clients with a university degree and that are over 40 years old.

Note that you need to specify the column name separately for every AND condition! You can add as many AND conditions as you need :)

This exercise is part of the course

SQL Tutorial for Marketers

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise