select count1=(select count(*) from grade where 分数<60),
count2=(select count(*) from grade where 分数>=60 and 分数<80),
count3=(select count(*) from grade where 分数>=80)
count2=(select count(*) from grade where 分数>=60 and 分数<80),
count3=(select count(*) from grade where 分数>=80)
解决方案 »
- 求个一句SQL,SQL2000里分页
- 该列没有包含在聚合函数或 GROUP BY 子句中
- 【一千里加急】误差问题,再求一转换函数SQL语句,解决利马揭帖
- int和varchar转换比较的问题
- 存储过程中的一个begin end中的语句是不是一个事务?
- 数据库突然就连不上了 求助 有截图
- 数据库可能有尚未备份的大容量日志记录更改,所以无法启用数据库镜像。必须在镜像上还原主体数据库的上一次日志备份。
- 大力、邹建,我没有多少分了,麻烦你们帮我看看这个问题!
- 能否是数据库字段名为条件来查询!
- 在Delphi中关于sql server中存储过程的问题
- sqlmangr.exe(应用程序错误)
- 请问Sql Server的自增字段(标识)有没有最大值?
count2=‘成绩>=60 and 成绩<80:)’+(select count(*) from grade where 成绩>=60 and 成绩<80),
count3=‘成绩>=80’+(select count(*) from grade where 成绩>=80)
select count1=(select count(*) from grade where 分数<60),
count2=(select count(*) from grade where 分数>=60 and 分数<80),
count3=(select count(*) from grade where 分数>=80)
count2=(select count(*) from grade where 分数>=60 and 分数<80),
count3=(select count(*) from grade where 分数>=80)
count2=(case when 分数>=60 and 分数<80 then 分数 else 0 end),
count3=(case when 分数>=80 then 分数 else 0 end ) from grade