比如select gid from table group by gid
查询时使用下面语句可以正常查出分组数据:
select count(distinct columnName) from table group by anyColumn
使用select count(gid) from table group by gid是错误的这样查询的是分组后 每个组内部的条数转载于:https://www.cnblogs.com/rchao/p/4562836.html##
比如select gid from table group by gid
查询时使用下面语句可以正常查出分组数据:
select count(distinct columnName) from table group by anyColumn
使用select count(gid) from table group by gid是错误的这样查询的是分组后 每个组内部的条数转载于:https://www.cnblogs.com/rchao/p/4562836.html##