student:name,sex,age
score:name,subject,score
想要的结果:name,sex,age,sum(score)
1.
select s.name,s.sex,s.age,(select sum(c.score) from score c where c.name = s.name) from student s;
2.
select s.name,s.sex,s.age,sc.total from (select sum(c.score) as total,c.name
from score c group by c.name) sc inner join student s on s.name = sc.name;