Created
August 2, 2017 18:37
-
-
Save xlucasdemelo/5acd83b8f16a460a82687c31c1b990cc to your computer and use it in GitHub Desktop.
Timescale
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 equipment_attribute_id, max(value) as value, time_bucket('8 hour', created) AS created | |
FROM conatus.measurement | |
WHERE ( created >= (SELECT CURRENT_DATE - interval '1 month' ) AND equipment_attribute_id IN ( 89, 120, 108, 123, 122, 125, 124, 113, 1, 121, 168 ) AND value != 'NaN') | |
group by 3, equipment_attribute_id | |
ORDER BY 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment