Created
April 13, 2021 03:15
-
-
Save garystafford/c473b42594d64b94ef1084ac431cef70 to your computer and use it in GitHub Desktop.
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 to_iso8601(date_parse(wirelessmetadata.lorawan."timestamp", | |
'%Y-%m-%dT%H:%i:%SZ') AT TIME ZONE 'UTC') AS ts_utc, | |
to_iso8601(date_parse(wirelessmetadata.lorawan."timestamp", | |
'%Y-%m-%dT%H:%i:%SZ') AT TIME ZONE 'America/New_York') AS ts_local, | |
wirelessdeviceid, | |
payloaddata.battery, | |
round(((payloaddata.boardtemp * 1.8) + 32), 2) AS board_temp, | |
payloaddata.rh, | |
round(((payloaddata.envtemp * 1.8) + 32), 2) AS env_temp, | |
payloaddata.voc, | |
payloaddata.iaq, | |
payloaddata.eco2, | |
wirelessmetadata.lorawan.gateways[1].rssi AS rssi, | |
wirelessmetadata.lorawan.gateways[1].snr AS snr | |
FROM lorawan_iot_core_analytics_data_store | |
WHERE payloaddecodername = 'tbhv110_915' | |
AND payloaddata IS NOT NULL | |
ORDER BY ts_local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment