Created
December 28, 2019 15:37
-
-
Save tallesairan/45e1adcb9194bd5ba95aa7bd3e9f4e80 to your computer and use it in GitHub Desktop.
find duplicate records mysql
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
SELECT | |
userId, | |
COUNT(userId) | |
FROM | |
payments | |
WHERE transactionStatus = 'approved' | |
GROUP BY userId | |
HAVING COUNT(userId) > 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment