sql统计类查询语句

时间:2017-03-13 21:53:27
【文件属性】:
文件名称:sql统计类查询语句
文件大小:4KB
文件格式:TXT
更新时间:2017-03-13 21:53:27
sql 统计 sql统计类代码 select type,count(*) as 总数量, sum(case when level='一级' then 1 else 0 end) as 一级, sum(case when level='二级' then 1 else 0 end) as 二级, sum(case when level='三级' then 1 else 0 end) as 三级 from table group by type

网友评论