Predict WHERE Filter
Predict Output Easy
Question
Given a `products` table with 10 rows, 4 of which have price > 50, what does this return?
Code
SELECT COUNT(*) FROM products WHERE price > 50;
Hint
WHERE filters before COUNT.
Explanation
WHERE filters rows to only those with price > 50 (4 rows), then COUNT(*) counts them. The result is 4.
Related Resources
Related Lessons
- WHERE Clause
Learn WHERE.
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.