Pertanyaan Anda sedikit penjelasannya, tetapi saya pikir Anda menginginkan fungsi jendela (hanya tersedia di MySQL 8.0):
select
time,
value,
(value - min(value) over() / (max(value) over() - min(value) over()) normalized_value
from measurement_values
where measure_id = 49 and time >= '2020-05-30 00:00'
Atau, di versi sebelumnya, Anda bisa mendapatkan hasil yang sama dengan menggabungkan tabel dengan kueri agregat:
select
mv.time,
mv.value,
(mv.value - mx.min_value) / (mx.max_value - mx.min_value) normalized_value
from measurement_values
cross join (
select min(value) min_value, max(value) max_value
from measurement_values
where measure_id = 49 and time >= '2020-05-30 00:00'
) mx
where measure_id = 49 and time >= '2020-05-30 00:00'