mysql中常見的分組函數有sum()求和函數、avg()求平均值函數、max()求最大值函數、min()求最小值函數、和count()計算個數函數幾種,使用方法如下:
1.sum() 求和
select sum(salary) from employees;
2.avg() 求平均值
select avg(salary) from employees;
3.max() 求最大值
select max(salary) from employees;
4.min() 求最小值
select min(salary) from employees;
5.count() 計算個數
select count(commission_pct) from employees;