mysql 统计数据字段去重

版权声明:未经本人同意,禁止转载! https://blog.csdn.net/TianPingXian/article/details/82716363

1:mysql 去重的正确节奏

select  count(DISTINCT id) from table where id in ('1','2')

2:mysql 分批统计

select  count(id) from table where id in ('1','2') group_by id

猜你喜欢

转载自blog.csdn.net/TianPingXian/article/details/82716363