mysql统计某个字段不一样值的个数

1.使用group by select count(*),‘列名’ from tablename group by ‘列名’web 2.使用sum和group by结合 select name, sum(case when status=2 then 1 else 0 end ), sum(case when status<>2 then 1 else 0 end ) from table gro
相关文章
相关标签/搜索