Created
April 7, 2023 07:13
-
-
Save mukarramjavid/b903216e638b273d3e1ed5e3d219829d to your computer and use it in GitHub Desktop.
Find Duplicates using CTE in SQL Server
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
;WITH CTE_RugbyLeague AS( | |
SELECT ProviderMatchId,TeamId,PlayerId ,ROW_NUMBER() OVER (PARTITION BY ProviderMatchId,TeamId,PlayerId ORDER BY ProviderMatchId DESC) AS ROW_NO | |
FROM CTE_RugbyLeague WITH(NOLOCK) | |
) | |
SELECT * | |
FROM CTE_RugbyLeague |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment