此篇文章内容均来自与mysql必知必会教材,后期有衍生会继续更新、补充知识体系结构 文章目录 SQL聚集函数表: AGV() count() 根据需求可以进行组合处理 max() min() max()、min()、avg()组合使用汇总数据 SQL聚集函数表: AGV() AVG(): 1、单列使用AVG(); 2、多列求平均值的情况下必须使用多个agv() 语法: select avg(列1) as 别名1, avg(列2) 别名2 … from 表; select avg(e.sal) 平均工资,avg(e.mgr) 平均补助 from emp e count() count()统计总数值 1、count(*) :返回的结果包含所有的null值