可以在 group 分组以后再过滤,
select age,count(*) from userluo group by age having count(*)>2
-- 使用 having 语句
select trim(studName),count(*) from student_1 group by trim(studName) having count(*)=2;
select count(*) studName from student_1 group by studName having count(*)=2