Complete GROUP BY
Fill in the Blank Easy
Question
Fill in the blank to count orders per user:
Code
SELECT user_id, COUNT(*) FROM orders ___ user_id;
Hint
This clause groups rows by a column for per-group aggregation.
Explanation
GROUP BY divides rows into groups by user_id, then COUNT(*) computes the count for each group. The result shows how many orders each user placed.
Related Resources
Related Lessons
- GROUP BY
Learn GROUP BY.
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.