Skip to content

Instantly share code, notes, and snippets.

@adamgibbons
Last active July 9, 2019 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save adamgibbons/325be03f34ec859092c4 to your computer and use it in GitHub Desktop.
Save adamgibbons/325be03f34ec859092c4 to your computer and use it in GitHub Desktop.
delete duplicate zips
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