标签:max sele min bsp group sql 统计 排序 msql
平均数
select avg(shop_price) from goods;
求最大最小
select min(shop_price) from goods;
select max(shop_price) from goods;
求行数
select count(*) from goods;
分组统计
group 是需要耗费资源的 会有排序
slect cat_id,avg(shop_price) from goods group by cat_id;
select cat_id,count(*) from goods group by cat_id;
select cat_id,max(good_price)) from goods group by cat_id;
标签:max sele min bsp group sql 统计 排序 msql
原文地址:http://www.cnblogs.com/czwzzb/p/7587511.html