### Introduction to GROUP BY and HAVING
The **GROUP BY** clause groups records that have the same value in one or more columns, allowing aggregate functions to be applied to each group. The **HAVING** clause then filters these groups, similar to the WHERE clause but for aggregated data.
#### Syntax
```sql
SELECT column, COUNT(*) AS Count
FROM table
GROUP BY column
HAVING COUNT(*) > 1;
```
#### Examples
- Group orders by customer to count the number of orders per customer.
- Filter groups to display only those that meet certain criteria, e.g. customers with more than one order.
#### Best Practices
- All non-aggregated columns must be included in the GROUP BY clause.
- Use HAVING to apply conditions on aggregated values.