select a.id,
(select avg(b.)
from result b
group by b.id
) as 考试平均成绩 ,
c.gym_ as 体育成绩,
d.moral as 德育成绩,
e.add as 成绩加分,
考试平均成绩+体育成绩+德育成绩+成绩加分 as FinalResult
from student a, 
     gym c,
     moraleducation d,
     add e
where a.id=b.id and a.id=c.id and a.id=d.id and a.id=e.id
order by a.id,体育成绩,德育成绩,成绩加分你可以考慮把表A,C,D,E都合併到表A中