本文共 250 字,大约阅读时间需要 1 分钟。
查询按cat_type分类出现的次数,可用如下语句:
select cat_type,count(*) as count from cat group by cat_type;
查询按cat_type分类大于多少次数,可用如下语句:
select cat_type,count(*) as count from cat group by cat_type having count>1;
转载地址:http://lebr.baihongyu.com/