Created
May 17, 2018 06:45
-
-
Save man-oi/7bb1dd3c6f63b4c5034fe523a6a179d6 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
DELETE bad_rows.* from wp_posts as bad_rows inner join ( select post_title, MIN(id) as min_id from wp_posts group by post_title having count(*) > 1 ) as good_rows on good_rows.post_title = bad_rows.post_title and good_rows.min_id <> bad_rows.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment