GROUP BY Clause
"Group By" allows us to group similar results together.
When to use
Use it when you want to group similar results together.
The Group By Clause looks like this:
SELECT COUNT ([Country]), [Country]
GROUP BY [Country]
This will give us a column with the number of customers from each country, and a corresponding column to show which country they are from. For example:
Hints & tips
- Group by allows you to aggregate and group
Lesson notes are only available for subscribers.