一个Book表中字段name有重复的数据,字段type也有重复的数据,统计每类书各有多少本。
sql数据查询统计总数
select count(distinct(字段名)) from table
或
select count(*) from table group by 字段
转载于:https://blog.51cto.com/393905515/1153744
一个Book表中字段name有重复的数据,字段type也有重复的数据,统计每类书各有多少本。
sql数据查询统计总数
select count(distinct(字段名)) from table
或
select count(*) from table group by 字段
转载于:https://blog.51cto.com/393905515/1153744