1. count()返回匹配制定条件的行数。
count(*)返回在给定的选择中被选的行数。
2.sum()返回组中所有值的和。sum只能用于数字列,空值会被忽略!
3.avg()返回组中值的平均值,空值回避忽略(默认值为16位)!
4.round (avg(列名),2)返回组中的平均值,可以选择保留一位或者两位。
5.max()返回组中值的最大值。
6.min()返回组中值的最小值。
7.过滤掉最低分小于60的学生,并平均分保留两位数值
select snum,sum(score) ,round (avg(score),2),max(score)
from Tbl_Grade
Group by snum having min(score)>=60;