1. 首页
  2. >
  3. 数据库技术
  4. >
  5. MySQL

最基础的分类统计SQL语句

原始数据如下:

最基础的分类统计SQL语句

想要得到的结果:

最基础的分类统计SQL语句

sql语句:

select dw,count(distinct zy) as zycount from table group by dw