postgreSQL how can I make this work with an aggregation alias?
A "WITH query" (CTE) may be useful for you (see: https://www.postgresql.org/docs/current/static/queries-with.html - read at least the first paragraph ...) 

Here's an example, very close to your situation.  Notice: date_ is the equivalent of time::date in your code:

with stats as (
  select
    date_ 
  , sum((status='404 NOT FOUND')::int) as not_found
  , sum((status='200 OK' OR status='404 NOT FOUND')::int) as total
  , sum( (status='404 NOT FOUND')::int) / 
         sum((status='200 OK' OR status='404 NOT FOUND')::int)::float  
    as percent_error
  from log
  group by date_
)
select not_found, total, percent_error
from stats
where percent_error &gt; 0.01 ;