select `type`,count(1) as counts from `api_count` group by `type`(order by counts DESC)
select `type`, //查询某个列 count(1) as counts //相同值的数量统计到(as)某列中 from `api_count` //来自某个表 group by `type` //根据(by)一定的规则进行分组(Group)