可答明以把清桥告b表和消族c表先去重
select
a.id,
a.name,
sum(b.value) value,
sum(c.value) value2
from A a
left join (select id,value from B group by id,value) b on a.id=b.aid
left join (select id,value from C group by id,value) c on a.id=c.aid
group by a.id,a.name
select
a.id,a.name,
sum(b.value) value,
(select sum(c.value) from C c where 尺姿a.id=c.aid) value2
from A a
left 陵老绝join B b on a.id=b.aid
group by a.id,a.name
order by 含郑a.id,a.name