Show max value from selected time range

Hi, I am trying to view Max value from MYSQL database and it is working.
But I want to that max value would be selected from time range selected from dashboard.

My sql code:

SELECT MAX(teplota) FROM esp_teplota.teplota1;

Welcome @mnskcze

Did you read through & try this?