COUNT Rows
Predict Output Beginner
Question
What does this SQL produce?
Code
-- users has 5 rows
SELECT COUNT(*) FROM users;
Hint
COUNT(*) returns the total number of rows.
Explanation
COUNT(*) counts all rows in the users table. With 5 rows, the result is 5. COUNT(*) includes NULL values.
Related Resources
Related Lessons
- Aggregations
Learn aggregations.
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.