Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DELETE FROM pmd_listings c1
- WHERE EXISTS (
- SELECT *
- FROM pmd_listings c2
- WHERE c2.id <> c1.id
- AND c2.friendly_url = c1.friendly_url
- AND c2.www = c1.www
- AND c2.listing_zip = c1.listing_zip
- )
- AND c1.id <> (
- SELECT MIN(c2.id)
- FROM pmd_listings c2
- WHERE c2.friendly_url = c1.friendly_url
- AND c2.www = c1.www
- AND c2.listing_zip = c1.listing_zip
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement