kevin_lai:这种题目的话我觉得面试官一般是想考我们行列转换的内容,我面了一些都要考这个考点,所以我们可以先进行行列转换,再筛选就清晰很多了
select SNO
from
(
select SNO,
case SUBJECT when "语文" then SCORE end as chinese_score,
case SUBJECT when "数学" then SCORE end as maths_score
from table1
)
where chinese_score >= 60 and maths_score <60