如题所述
select Cla,
count(case when Ssex=1 then 1 else 0 end) as '男',
count(case when Ssex=2 then 1 else 0 end) as '女'
from student group by Cla