时间:2021-07-01 10:21:17 帮助过:2人阅读
max用法
$sql="select max(id) as maxid from e_user"; $sql="select id as maxid from e_user order by id desc limit 0,1";
min用法
$sql="select min(id) as minid from e_user"; $sql="select id as minid from e_user order by id desc limit 0,1";
sum 用法 求总和
$sql="select sum(id) as total from e_user";
AVG 用法 求平均值
$sql="select avg(id) as total from e_user";
mysql count max min 语句用法
标签: