group by
group by: 根据by对数据按照哪个字段进行分组,或者是哪几个字段进行分组
select 字段 from 表名 group by 字段 having 过滤条件
eg:
SELECT id, COUNT(course) as numcourse, AVG(score) as avgscore FROM student GROUP BY id HAVING AVG(score)>=80;
SELECT name FROM student GROUP BY name HAVING min(score)>=80;