I'm trying to get an output of 3 decimal places out of the below query.
the output i'm getting is 2.2600
if I changed the parameter 4 to be 3 in round function below, the output will be 2.300
which is incorrect, it should be 2.26
Select date(time),
round((count(case WHEN status='404 NOT FOUND' THEN 1 END))
/
(count(*))::numeric,4) * 100 as error_percentage
from log GROUP BY date(time)
ORDER BY error_percentage DESC