数据库聚合函数命令

-- 最小的数

select min(math) from student2 ;

-- 最大的数

select max(math) from student2 ;

-- 统计总共数据

select count(math) from student2 ;

-- 统计总数

select sum(math) from student2 ;

-- 平均数

select avg(math) from student2 ;

-- 去重

select DISTINCT(math) from student2 ;

posted @ 2025-11-17 17:52  黑田慎平  阅读(4)  评论(0)    收藏  举报