标签:技术分享 rom jpg .com sel 分享 info sql max
常用的聚合函数有:
平均值:avg()
取个数:count()
取总和:sum()
取最大值:max()
取最小值:min()
用法:select 聚合函数 from 表名 group by 字段名;
例如:
select * from student;
select count(ssex) from student group by ssex;
select count(ssex) as a from student group by ssex having a>3;
标签:技术分享 rom jpg .com sel 分享 info sql max
原文地址:https://www.cnblogs.com/lsqbk/p/10260199.html