SLSkillLoop
SQL practice

SQL WHERE Practice

WHERE clauses make SQL useful by filtering rows to the data you actually need. Practice common filters with short query exercises.

How to practice SQL WHERE

WHERE practice is about turning plain-language filters into exact conditions. Strong SQL learners can tell whether a row should be included before they ever run the query.

For each exercise, identify the column, comparison, and value. Then check whether the filter uses equality, ranges, NULL handling, patterns, or multiple conditions.

What to focus on
  • Text, number, and date filters
  • NULL checks and LIKE patterns
  • AND, OR, and combined conditions

Example practice questions

Try these samples, then continue into the SQL Practice Labfor guided browser-based practice.

1

Return users where country is 'Canada'.

Answer: SELECT * FROM users WHERE country = 'Canada';

2

Return products where price is greater than 100.

Answer: SELECT * FROM products WHERE price > 100;

3

Return orders where status is not 'cancelled'.

Answer: SELECT * FROM orders WHERE status <> 'cancelled';

4

Return customers where email is missing.

Answer: SELECT * FROM customers WHERE email IS NULL;

5

Return products where category is 'Books' and price is under 20.

Answer: SELECT * FROM products WHERE category = 'Books' AND price < 20;

6

Return users created on or after 2026-01-01.

Answer: SELECT * FROM users WHERE created_at >= '2026-01-01';

7

Return products where name starts with 'Pro'.

Answer: SELECT * FROM products WHERE name LIKE 'Pro%';