For a one-level parent/children relationship, as shown in your sample data, I would recommend:
select
coalesce(parent, wonum) wonum
sum(actlabcost) actlabcost,
sum(actmatcost) actmatcost,
sum(actservcost) actservcost,
sum(acttoolcost) acttoolcost
from workorder wo
group by coalesce(parent, wonum)
CLICK HERE to find out more related problems solutions.