select a.fenlei, count(*), count(*)/(select count(*) from test)*100 as percentage, constitute from test a, (select fenlei, group_concat(mc,',',cnt) as constitute from (select fenlei, mc, count(*) as cnt from test group by 1,2) t group by 1) t1 where a.fenlei=t1.fenlei group by 1
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论