Skip to content

Instantly share code, notes, and snippets.

@ldenson11
Created October 28, 2019 18:01
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 ldenson11/c966986bcb90d9f4a4c19b065eef6cc9 to your computer and use it in GitHub Desktop.
Save ldenson11/c966986bcb90d9f4a4c19b065eef6cc9 to your computer and use it in GitHub Desktop.
SELECT userid, sum(clickcount) as clicks, TUMBLE_END(eventTimestamp) AS ts
FROM clickstream
WHERE continent = 'AUSTRALIA'
GROUP BY userid, TUMBLE(eventTimestamp, 'interval 10 minute')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment