Skip to content

Instantly share code, notes, and snippets.

@bastisk
Created September 18, 2015 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bastisk/63ff3973f613023249b3 to your computer and use it in GitHub Desktop.
Save bastisk/63ff3973f613023249b3 to your computer and use it in GitHub Desktop.
SELECT
MAX(time) AS time,
MAX(temperature) as TempMax,
Min(temperature) as TempMin,
AVG(temperature) as TempAvg
FROM
Input TIMESTAMP BY time
GROUP BY
TumblingWindow(Second, 20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment