-
-
Save ldenson11/dc9ab2ffd67b9d591ab651a9de225b17 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
-- detect multiple large transactions within an 15m period | |
-- send to alerting framework | |
SELECT card, userid | |
TUMBLE_END(eventTimestamp, interval '15' minute) as ts | |
FROM auths | |
WHERE amount > 10000 -- large transaction | |
GROUP BY card, userid, TUMBLE(eventTimestamp, interval '15' minute) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment