mysql聚合函数 常见聚合函数 总数count,最大值max,最小min,平均avg,求和sum select count(列名) '在这里定义输出的别名' from 表名 where 条件(可选) select max(列名) '别名'from 表名 where 条件 其他同理 ....