标签:
select 字段 ,count(1) as num ,sum(price) as price from table group by 字段 where 条件
group by后统计个数
原文地址:http://www.cnblogs.com/LoveJulin/p/4543541.html