Scale to 100 in one query

is something like this possible in one query or do i have to do it with 2 measurements like i do atm

SELECT (mean(“value”) *100) /max FROM (SELECT max(min) FROM ( SELECT min(“value”) FROM “sensor2” WHERE time > now() - 3d GROUP BY time(20m)))

what this does is taking the actual value, moltiplicates it with 100 and divides this through the highest one from the lowest out of a 20 min window from last 3 days.

would be awesome if i could visualize this without saving the information which is there in another form already.