-
-
Save ldenson11/1b5b6d9fbf2a8cfa31d9e45c13bb9e3a to your computer and use it in GitHub Desktop.
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
-- aggregate transactions over time and for enterprise data Warehouse | |
-- use hourly because storage in EDW is expensive | |
SELECT | |
card, | |
amount, | |
userid, | |
eventTimestamp as transaction_time | |
FROM auths | |
GROUP BY TUMBLE(eventTimestamp, interval '1' hour) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment