Created
November 3, 2019 18:21
-
-
Save sanfx/12a84987c89561b4808a52aa658a42f0 to your computer and use it in GitHub Desktop.
SQL query used in Grafana to get temperature and humidity form MySQL server and computer dew point and heat index and display in panel.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
dt_created AS "time", | |
temp AS "Temperature", | |
humidity AS "Humidity", | |
(temp - ((100 - humidity)/5)) AS "Dew Point", | |
((temp* 1.8) + 32) AS temp_f, | |
(((-42.379 + 2.04901523*@temp_f + 10.14333127*humidity - .22475541*@temp_f*humidity - .00683783*@temp_f*@temp_f - .05481717*humidity*humidity + .00122874*@temp_f*@temp_f*humidity + .00085282*@temp_f*humidity*humidity - .00000199*@temp_f*@temp_f*humidity*humidity) - 32)*.5556) | |
AS "Feels Like" | |
FROM particle_photon | |
ORDER BY dt_created; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment