Created
August 9, 2020 09:55
-
-
Save mutolisp/00470c59bf6eefc232f9b7cb8d2031ac to your computer and use it in GitHub Desktop.
timescaleDB get time period
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 | |
time_bucket('1 day', timestamp) AS period, | |
summit, | |
direction, | |
avg(temperature), | |
max(temperature), | |
min(temperature) | |
FROM | |
temperature_hyper | |
WHERE | |
summit='DSH' | |
group by period,summit,direction | |
order by summit,period |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment