Having 用处 having用于group by之后的的分组统计 Having和Where的区别 where作用于表中的列,having作用于查询结果中的列where后不能写分组函数,having后可以使用分组函数 示例 求每个学生平均分数大于60的人 select s_id,avg(s_score) as avgScore from score group by s_id having avgScore > 60;