6聚合查询

Mysql聚合查询

1.sum求和

Select sum(age) from worker;

2.avg求平均值

Select avg(age) from worker;

3.max求最大值

Select max(age) from worker;

4.min求最小值

Select min(age) from worker;

5.count统计数量

Select count(*) from worker;

posted @ 2023-07-25 11:49  常疯大虾  阅读(6)  评论(0编辑  收藏  举报