mysql group by分组查询后 查询个数
2个方法随便你选
select count(distinct colA) from table1;
select count(*) from (select colA from table1 group by colA) gyd;
用了子查询一定要用别名
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/4059.html
mysql group by分组查询后 查询个数
2个方法随便你选
select count(distinct colA) from table1;
select count(*) from (select colA from table1 group by colA) gyd;
用了子查询一定要用别名
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/4059.html