课程名字必须是确定的
select t.name,
max((case
when t.source = 'chinese' then
t.mark
end)) chinese,
max((case
when t.source = 'math' then
t.mark
end)) math
from ss t
group by t.name
select name,course from A where 条件
本人水平有限,个人认为这不能一句话就可以,要两句,再把各个结果使用变量,再相加.