Created
March 20, 2016 20:42
-
-
Save jazlopez/4f45d2331269c518c7ca to your computer and use it in GitHub Desktop.
MYSQL | Comma separated list of ids from duplicated values in a field name
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 GROUP_CONCAT(id), EMAIL, COUNT(*) as COUNT | |
FROM customer | |
GROUP BY email | |
HAVING COUNT(*) >= 2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment