--对数据进行统计
--count(distinct /ALL) 统计记录个数--SUM([distinct /ALL]<列名>)计算一列值总和
--AVG([distinct /ALL]<列名>)计算一列值平均数
--MAX([distinct /ALL]<列名>)计算一列值最大数
--MIN([distinct /ALL]<列名>)计算一列值最小数
select count(备注) from st_table
select sum(学号)as 学号总和 from st_table
select avg(学号)as 学号平均值 from st_table
select max(学号)as 学号最大值 from st_table
select min(学号)as 学号最小值 from st_table
--compute 对查询结果所有记录进行汇总统计,并显示详细信息
-- compute 集合函数[列名] ;集合函数有:sum(),avg(),countg()
SELECT *FROM st_table
ORDER BY 系部代码
compute sum(成绩)