select
sum(parent.value) --统计时重复了
,sum(child.value)
。。。
from parent left join child house on child.parent_id = parent.id
where 。。。。
这里sum(parent.value)统计重复了
select
sum(parent.value) --统计时重复了
,sum(child.value)
。。。
from parent left join child house on child.parent_id = parent.id
where 。。。。
这里sum(parent.value)统计重复了