Calculate percent of roads (by length) where condition is >=15 I have a road condition table:
CONDITION       LENGTH
    2              5
    4             10
    6             15
    8             20
   10             25
   12             30
   14             35
   16             40
   18             45
   20             50

Roads that are at a condition of 15 or greater ( a.k.a. 15_OG) are considered to be in a good condition.
I want to calculate the percentage of roads (by length) that are at a good condition.
LENGTH_15_OG    TOTAL_LENGTH    PERCENT_15_OG
     135             275            49.09%


How can I do this calculation?
There will be other solutions - but how about ...

select 
  length_15_og
, total_length
, round( length_15_og / total_length * 100, 2 ) as percent_15_og
from (
  select 
    ( select sum( length ) from road_condition where condition &gt;= 15 ) as length_15_og
  , ( select sum( length ) from road_condition ) as total_length
  from dual
) ;

-- result
LENGTH_15_OG  TOTAL_LENGTH  PERCENT_15_OG  
135           275           49.09 


Dbfiddle