I have a table in a database which holds a value for space used, and a value for space available. What I want to do is find the % of used / free space.
select
datetime AS "time",
storage.name as metric,
(used_disk_size / (available_disk_size + used_disk_size))*100 as "Total disk space"
from
usage
inner join storage on usage.storage_id = storage.storage_id;
When I run the above I get 0s in all columns.