Created
September 22, 2022 06:34
-
-
Save AshishKapoor/2c5e489b8f009af4e1e7f85b99384f5e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 DATE_TRUNC('day', time) AS __timestamp, | |
fill_level AS fill_level, | |
sensor_id AS sensor_id, | |
AVG(sensor_id) AS "AVG(sensor_id)" | |
FROM demo.pg_fill_measurements | |
GROUP BY fill_level, | |
sensor_id, | |
DATE_TRUNC('day', time) | |
ORDER BY "AVG(sensor_id)" DESC | |
LIMIT 10000; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is for a simple pg table