select a.id,avg(b.) as 考试平均成绩 ,max(c.gpm_) as 体育成绩,
max(d.moral) as 德育成绩,max(e.add) as 成绩加分,
考试平均成绩+体育成绩+德育成绩+成绩加分
from student a,result b,gym c,moraleducation d,add e
where a.id=b.id and b.id=c.id and c.id=d.id and d.id=e.id
group by a.id不会影响查询结果 请试一下