比如select gid from table group by gid
查询时使用下面的方法查询条数
select count(distinct gid) from table
使用select count(gid) from table group by gid是错误的
这样查询的是分组后 每个组内部的条数
比如select gid from table group by gid
查询时使用下面的方法查询条数
select count(distinct gid) from table
使用select count(gid) from table group by gid是错误的
这样查询的是分组后 每个组内部的条数