Created
September 25, 2019 07:42
-
-
Save aalipar13/dd204010a03c8c3036579fe665ed8405 to your computer and use it in GitHub Desktop.
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
SELECT | |
title, COUNT(title) | |
FROM | |
cities | |
GROUP BY | |
title | |
HAVING | |
COUNT(title) > 1; | |
DELETE t1 FROM cities t1 | |
INNER JOIN cities t2 | |
WHERE | |
t1.id < t2.id AND | |
t1.title = t2.title; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment