3,494
社区成员




select sum(case when a>91.5 and a<93 then 1 else 0 end) "91.5-93",
sum(case when a>93.5 and a<95 then 1 else 0 end) "93.5-95",
sum(case when a>95.5 and a<98 then 1 else 0 end) "95.5-98",
sum(case when a>98 and a<100 then 1 else 0 end) "98-100"
from tablename
union all
select sum(case when b>91.5 and b<93 then 1 else 0 end) ,
sum(case when b>93.5 and b<95 then 1 else 0 end) ,
sum(case when b>95.5 and b<98 then 1 else 0 end) ,
sum(case when b>98 and b<100 then 1 else 0 end)
from tablename
union all
.....