group by 的个bai数,和having 的个数没有什么必然的联系,group by 后面du可以跟多个zhi字段,同样 你如果有多个聚合计算dao,当然 having 后面也可以跟多个聚合条件
比如:
select name 名字,sum(record) 分数,avg(average) 平均数 from student group by name having sum(record) >xxxxxx and avg(average)>yyyyyyy..........
标签:group,多个,sum,average,mysql,avg,having
From: https://blog.51cto.com/u_16270801/7772280