Last active
July 9, 2019 22:38
-
-
Save adamgibbons/325be03f34ec859092c4 to your computer and use it in GitHub Desktop.
delete duplicate zips
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
DELETE FROM geoname WHERE (zip, place, state) IN | |
(SELECT DISTINCT ON (zip) zip, place, state FROM geoname WHERE zip IN | |
( '10804', | |
'15129', | |
'15714', | |
'19018', | |
'27539', | |
'28470', | |
'30598', | |
'32305', | |
'32309', | |
'32352', | |
'32461', | |
'32563', | |
'32566', | |
'33028', | |
'33042', | |
'33326', | |
'33327', | |
'33777', | |
'33927', | |
'34609', | |
'34610', | |
'36203', | |
'39208', | |
'39218', | |
'39232', | |
'39272', | |
'39288', | |
'44334', | |
'46971', | |
'53235', | |
'54082', | |
'60527', | |
'66741', | |
'67221', | |
'73055', | |
'75048', | |
'81066', | |
'83714', | |
'85086', | |
'91701', | |
'91737', | |
'95304', | |
'95652' ) | |
ORDER BY zip | |
) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment