比如select gid from table group by gid

查询时使用下面的方法查询条数

select count(distinct gid) from table

使用select count(gid) from table group by gid是错误的

这样查询的是分组后 每个组内部的条数

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-25
  • 2021-05-21
  • 2021-06-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-02
  • 2021-12-03
  • 2022-12-23
相关资源
相似解决方案