Last active
March 24, 2022 09:15
-
-
Save Mr--John-Doe/afd6f946d57b590e361d2135c8a2b420 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
WITH first_user_login AS ( | |
SELECT user, MIN(login_ts) AS min_date | |
FROM logins | |
GROUP BY 1 | |
) | |
SELECT user, platform as first_login_platform, ... | |
FROM logins | |
WHERE (user, login_ts) IN (SELECT user, min_date FROM first_user_login) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment