select SNO from (select SNO, sum(case subject when'语文' then score else null end) as chinese_score, sum(case subject when'数学' then score else null end) as math_score from t group by SNO ) as tt where tt.chinese_score>=60 and tt.math_score<60 ===================================== 如果是case subject ……else 0的话结果就会多了一个1002

相关推荐

07-18 18:05
门头沟学院 Java
挂了&nbsp;正式批求捞
投递滴滴等公司9个岗位
点赞 评论 收藏
分享
07-15 16:52
已编辑
门头沟学院 Java
周五投的,流程今天结束
投递地平线等公司7个岗位
点赞 评论 收藏
分享
06-10 23:36
已编辑
首都经济贸易大学 C++
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务