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
Get step-by-step solutions from verified subject matter experts
