Predict IN Clause
Predict Output Easy
Question
Given categories: 'a', 'b', 'c', 'd', how many rows match?
Code
SELECT COUNT(*) FROM items WHERE category IN ('a', 'c');
Hint
IN matches any value in the list.
Explanation
The IN clause matches rows where category is 'a' or 'c'. Two rows match, so the count is 2.
Related Resources
Related Lessons
- WHERE Clause
Learn IN.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.