AVG (平均) COUNT (计数) MAX (最大值) MIN (最小值) SUM (总合) 运用函数的语法是: selecte "函数名"("列名") from "表格名
1.AVG :select AVG(Grade) from Table1,返回结果:Table1中Grade列的平均值
2.COUNT :select COUNT (distinct Name) from Table1 where Grade>60,返回结果:Table1中Grade>60并且名字不重复(distinct去重)的数量
3.group by:分组,实例:select Name count(Name) from Table1 where count(Name)>3 group by Name,返回结果:Name重复超过3次的Name以及数量
4.having :语法:select 列名 from 表名 where 条件 having 函数,
实例:select Name from Table1 group by Name having Count(Name)>3,返回结果:Name重复超过3次的Name
5.join:表格链接,实例:select T1.S_Name Name,Sum(T2.Grade) Z_Grade from Student T1,Grades T2 where T1.Namw=T2.Name group by T2.Name