title: Integrate a tree in oracle
body: <p>I have a query like below:</p>
  
  <pre><code> select * from (
  select * from (
  select distinct * from TBL_IDPS_TREE 
  START WITH LEDGER_CODE in  (
  
   10912520000
  ,10825060000
  ,10912380000
  ,11311110201
  )
      CONNECT BY PRIOR  parent_CODE = LEDGER_CODE
    )a  left join (
  select /*+ PARALLEL(AUTO) */  balance as "y300" , ledger_code as "id",'' as "x300" , round(abs(balance)/30835,2) as "z300",name as "name"   from tbl_ledger_archive where ledger_code in ( 
  10912520000
  ,10825060000
  ,10912380000
  ,11311110201) and eff_date ='29-MAY-19'
  ) b
  on a.LEDGER_CODE = b."id")
  START WITH PARENT_CODE is null
  connect by PRIOR LEDGER_CODE = Parent_CODE
  
   ;
  </code></pre>
  
  <p>and the result is : 
  <a href="https://i.stack.imgur.com/hGV5C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hGV5C.png" alt="enter image description here"></a></p>
  
  <p>x300,y300,z300 are the value of tree.</p>
  
  <p>I want to change a query that integrate the tree value for x300,y300,z300
  I mean the query must integrate tree value from leaves to root.</p>