select a.sno from (select * from sqltest where subject = '语文&(8803)#39; and score >= 60) as a inner join (select * from sqltest where subject = '数学&(8804)#39; and score <60) as b on a.sno = b.sno select a.sno from (select sno, sum(case subject when '语文&(8803)#39; then score else null end) as chinese_score, sum(case subject when '数学&(8804)#39; 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