Question: 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

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

past attempts

--select (id) as total_people, age from people group by age HAVING COUNT(id) > 10; --select age, id as total_people from people group by age; select age, id as total_people from people group by age, id having count (id) >10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!