title: Select attributes from parent rows (and include cost of children)
body: <p>I have a WORKORDER table that has parent and child WOs in it. There are only two levels to the hierarchy: parent and children (no grandchildren, etc.)</p>
  <hr />
  <pre><code>with workorder as (
  select 'WO37342' as wonum,      null as parent, 'WINTER STORM' as classification, 297.36 as actlabcost, 200 as actmatcost from dual
  union all
  select 'WO37427' as wonum, 'WO37342' as parent, 'ANTI-ICING'   as classification,  99.12 as actlabcost,   0 as actmatcost from dual
  union all
  select 'WO37429' as wonum, 'WO37342' as parent, 'SNOW FENCE'   as classification,  99.12 as actlabcost, 100 as actmatcost from dual
  )
  select
      * 
  from
      workorder
  
  
  WONUM     PARENT    CLASSIFICATION ACTLABCOST ACTMATCOST
  -------   -------   -------------- ---------- ----------
  WO37342             WINTER STORM       297.36        200
  WO37427   WO37342   ANTI-ICING          99.12          0
  WO37429   WO37342   SNOW FENCE          99.12        100
  </code></pre>
  <hr />
  <p>I want to select the attributes from the parent rows and include the cost of the children:</p>
  <pre><code>WONUM     CLASSIFICATION ACTLABCOST ACTMATCOST
  -------   -------------- ---------- ----------
  WO37342   WINTER STORM        495.6        300
  </code></pre>
  <hr />
  <p>Is there a concise way of doing this in Oracle 18c?</p>
  <p><em>(My goal is for the SQL to be as simple/readable as possible.)</em></p>