-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ammon Smith
committed
Jul 14, 2019
1 parent
21f235c
commit 0d0002c
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- Looks for people who send '!join' right after joining, | ||
-- and then deleted it soon after. | ||
|
||
-- Uses snowflake_time from id_to_snowflake.sql | ||
|
||
SELECT | ||
users.name || '#' || users.discriminator AS username, | ||
snowflake_time(users.real_user_id) AS created_at, | ||
messages.created_at AS message_sent, | ||
messages.deleted_at AS message_deleted, | ||
users.real_user_id, | ||
users.int_user_id | ||
FROM messages | ||
JOIN users | ||
ON messages.int_user_id = users.int_user_id | ||
WHERE messages.content = '!join' | ||
AND messages.channel_id = 209074609893408768 -- #join | ||
AND messages.deleted_at IS NOT NULL | ||
AND messages.deleted_at - messages.created_at < '4 minutes'::interval; |
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