1 minus percentage returns negative number
Or you could just use GREATEST with 0:

select
    insp_id,
    deficiency_length,
    sidewalk_length,
    greatest(0, 1 - (deficiency_length / sidewalk_length)) as condition_percent
from
    user.sidewalk_insp;


The above function returns 0 or calculated condition percent, whichever is greater.