Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. SELECT
  2. title, COUNT(title)
  3. FROM
  4. cities
  5. GROUP BY
  6. title
  7. HAVING
  8. COUNT(title) > 1;
  9.  
  10. DELETE t1 FROM cities t1
  11. INNER JOIN cities t2
  12. WHERE
  13. t1.id < t2.id AND
  14. t1.title = t2.title;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement