In the previous units, you mastered using LIKE
for pattern matching and AND
/OR
to combine conditions. Now, we'll practice using them together to solve more complex problems.
Remember, parentheses ()
are key to controlling the order of operations when your logic gets tricky.
Engagement Message
Ready to tackle some advanced filtering challenges?
Type
Multiple Choice
Practice Question
Which query correctly finds all products in the 'Apparel' category whose names contain the word 'Jacket'?
A. SELECT * FROM products WHERE category = 'Apparel' OR name LIKE '%Jacket%'; B. SELECT * FROM products WHERE category = 'Apparel' AND name = 'Jacket'; C. SELECT * FROM products WHERE category = 'Apparel' AND name LIKE '%Jacket%'; D. SELECT * FROM products WHERE category LIKE 'Apparel' AND name LIKE '%Jacket%';
Suggested Answers
- A
- B
- C - Correct
- D
Type
Fill In The Blanks
Markdown With Blanks
Fill in the blanks to find all users who are either from Texas or have a .gov
email address.
Suggested Answers
- OR
- LIKE
- AND
- =
