select
sum(case when ( 字段名>0 and 字段名<4000) then 1 else 0 end) 别名,
sum(case when 字段名>=4000 and 字段名<8000 then 1 else 0 end) 别名,
sum(case when 字段名>=8000 then 1 else 0 end) 别名 ,
count(*) as total
from 表名
分段查询统计
最新推荐文章于 2022-12-15 09:39:38 发布