Created
April 19, 2021 18:33
-
-
Save kgorman/86b32ec35b6d32b15d34962bde07247f to your computer and use it in GitHub Desktop.
Revisions
-
Kenny Gorman created this gist
Apr 19, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ SELECT userid, SUM(amount) AS theamount, tumble_end(timestamp, interval '1' hour) AS ending_ts FROM mystream GROUP BY userid, tumble(timestamp, interval '1' hour)