sql语句中的having count是什么意思
select id, count() from table a where 1=1 group by id having count()>2
select id, count() from table a where 1=1 group by id having count()>2
以id分组统计,查询分组后数量大于2的id和数量
SELECT
age
FROM
user
GROUP BY
age
HAVING
count( age ) >= 3
查询user表中,年龄重复次数大于等于3的age,并输出age的值