select class,
sum(case score >=60 then 1 else 0 end) as '及格人数',
sum(case score < 60 then 1 else 0 end) as '不及格人数'
from student group by class
sum(case score >=60 then 1 else 0 end) as '及格人数',
sum(case score < 60 then 1 else 0 end) as '不及格人数'
from student group by class
解决方案 »
- 如可获取url中非本地域名
- asp转php,或asp结合php
- sql2000 datetime导入mysql datetime
- 显示mysql_fetch_array()函数有错是怎么回事?
- 求一个完整的无限分类的树形类,,,
- 问一个PHP的简单问题,请大家帮个忙!关于连sql server2000的
- php base64与java(android)base64 有误差 求解决方案
- 当我在httpd.conf里面加了这三句就不能重起Apache了,为什么?
- 为什么我的表格线不显示
- 我应该怎么检查PHP页面是否在发送头信息之前有没有输出?
- 自己写了一个跳转函数一直在报错
- 求php解密解码,这个是PHPJM加密的吗
(select count(*) from student where class=stu.class and score >=60 ) as '及格人数',
(select count(*) from student where class=stu.class and score <60 ) as '及格人数',
from student stu group by class
select class,
(select count(*) from student where class=stu.class and score >=60 ) as '及格人数',
(select count(*) from student where class=stu.class and score <60 ) as '不及格人数',
from student stu group by class