Created
August 18, 2020 00:08
-
-
Save jamesasu/ffba1da6de0b363e230a5209d16899d8 to your computer and use it in GitHub Desktop.
Use window functions to remove duplicate rows
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 characters
-- Use window functions to remove duplicate rows: | |
SELECT * EXCEPT(row_number) | |
FROM ( | |
SELECT | |
Email, | |
ROW_NUMBER() OVER (PARTITION BY Email) row_number | |
FROM Dataset.Emails | |
) | |
WHERE row_number = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment