# SQL Basics: Simple HAVING

## [SQL Basics: Simple HAVING ](https://www.codewars.com/kata/58164ddf890632ce00000220)

For this challenge you need to create a simple HAVING statement, you want to count how many people have the same age and return the groups with 10 or more people who have that age.

### people table schema

* id
* name
* age

### return table schema

* age
* total\_people

> NOTE: Your solution should use pure SQL. Ruby is used within the test cases to do the actual testing.

## Solutions

#### 🗃️ Sql

```sql
select age, count(age) as total_people
from people
group by age
having count(age) >= 10;
```
