t2为公式表SELECT t3.col,nvl(tt.n,0) 
FROM t3
left join (select t.f,sum(level) n from( select col, REGEXP_SUBSTR(formula, '[^-^+^*]+', 1, LEVEL)  f
           from T2
         CONNECT BY LEVEL <= REGEXP_COUNT(formula, '[^-^+^*]+')
                and rowid = prior rowid
                and prior dbms_random.value is not null) t 
                start with t.col in (select col from t3)
  CONNECT BY t.col = PRIOR f
group by t.f) tt on t3.col=tt.f
order by nvl(tt.n,0) desc