菜鸟提问,能否帮改造下SQL原SQL如下, 性能太差鸟 select AAAA.id
from AAAA
where (select sum(BBBB.percent) from BBBB
where AAAA.id=BBBB.AAAA_id )<100
from AAAA
where (select sum(BBBB.percent) from BBBB
where AAAA.id=BBBB.AAAA_id )<100
from bbbb
group by bbbb.aaaa_id
having sum(BBBB.percent)<100
from TEST t, ACT p
where p.a_id= t.a_id
and p.status='1'
group by t.a_id
having (sum(p.percent) < 100)