select a.sno from (select * from sqltest where subject = '语文' and score >= 60) as a inner join (select * from sqltest where subject = '数学' and score <60) as b on a.sno = b.sno select a.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 match_score from sqltest group by sno) as a where a.chinese_score >= 60 and a.match_score < 60
点赞 评论

相关推荐

11-07 21:45
已编辑
福建省建阳第一中学 golang
点赞 评论 收藏
分享
牛客网
牛客企业服务