How to calculate success rate


Given the following measurement named results, I was wondering if anyone could advise how to get the success rate?

time                                 value
1550830530007000000  FAIL
1560830530007000000  SUCCESS
1570830530007000000  SUCCESS
1580830530007000000  FAIL
1590830530007000000  SUCCESS

I can see how to get the total number of SUCCESS

SELECT count(*) where value=‘SUCCESS’

but not really sure how to get the rate result for example:

number of success / total * time_range