标签:
=====聚合函数=====
sum 求和
select sum(列名)from 表名
count 计数
select count(*)from 表名
avg 平均数
select avg (列名)from 表名
max 最大值
select max(列名)from 表名
min最小值
select min(列名)from 表名
注:
1、聚合函数不统计空值
2、如果使用聚合函数的时没有group by分组,聚合函数默认把整个表中的数据当成一组来统计
标签:
原文地址:http://www.cnblogs.com/xiao55/p/5579769.html