Advertisement
Beginner SQL & Database Querying, SQL Aggregations & Grouping

What does GROUP BY do?

Short answer

Groups rows for aggregation.

Save SQL & Database Querying mock interview
Advertisement
AModel answer
Groups rows for aggregation.
Example

Sales by region.

Real-world example
Using GROUP BY, an analyst calculated monthly revenue by region in seconds.
Likely follow-ups
  • What are aggregate functions
  • What is GROUP BY
  • What is HAVING
Related topics