Aggregate Without GROUP BY
Concept Check Medium
Question
What does `SELECT AVG(price) FROM products` return?
Hint
Without GROUP BY, all rows are treated as one group.
Explanation
Without GROUP BY, the aggregate function treats all rows as a single group and returns one row. SELECT AVG(price) FROM products returns a single row containing the average price across all products.
Related Resources
Related Lessons
- Aggregations
Learn aggregate behavior.
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.