Grafana

MySQL data source

Get Max/Min Value From Selected Interval

To get the max/min/avg-value from a selected interval in Grafana when using MySQL as data storage just add the following expression to your SQL query:

<SQL-QUERY> WHERE $__timeFilter(<time-column>)

Replace <time-column> with the name of your column where the time data is stored.

After that navigate to Value options>Calculation and select MAX/MIN/AVG.

Sourced from grafana.com - table queries and community.grafana.com - min-max-values