select sum(case when b>=1 and b<100 then 1 else 0 end) "1-100"
,sum(case when b>=100 and b<1000 then 1 else 0 end) "100-1000"
,sum(case when b>=1000 and b<2000 then 1 else 0 end) "1000-2000"
..........
,sum(case when b>=9000 and b<10000 then 1 else 0 end) "9000-10000"
from table
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货