sql 分组查询及格不及格人数

select score as 类别,count(*) as 人数 from
(select case when fen>=60 then '及格' else '不及格' end as score from fen )
fen group by score

原文地址:https://www.cnblogs.com/b422/p/3725903.html