mysql语句求按字段分组后组数是多少

select count(distinct ID) from table

Thinkphp CURD写 $count = $model->where($where)->count('distinct 字段名');

posted on 2016-06-13 16:08  caigan  阅读(540)  评论(0编辑  收藏  举报