select (SELECT O2.ORG_NAME
FROM OUTSOURCE_ORG O2
where o2.org_id = oo.parent_id) net_NAME,
oo.parent_id,
sum(oz.line_length) as net_length
from outsource_org oo, outsource_zone_line_length oz
where oz.line_length is not null
and oo.org_type = '5'
and to_char(oo.org_id) = oz.zone_id
group by oo.parent_id
order by oo.parent_id