Skip to content

Instantly share code, notes, and snippets.

@seralf
Created October 9, 2015 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seralf/355ecd5afee5051b6848 to your computer and use it in GitHub Desktop.
Save seralf/355ecd5afee5051b6848 to your computer and use it in GitHub Desktop.
geonames
/*
* geonames.db dump
* taken from http://geonames.db.94y.info/
*
* SEE:
* https://github.com/mjradwin/geonames-sqlite
* https://github.com/robotamer/geonames-to-sqlite
*/
SELECT geo.geonameid AS id,
geo.asciiname AS name, names.name AS alt_names,
geo.latitude, geo.longitude,
-- fea.abbrev,
TZ.name AS timezone
FROM geonames AS geo
JOIN altnames AS names ON (names.geonameid=geo.geonameid)
JOIN featurecodes AS fea ON (fea.featurecodeid = geo.feature_code)
JOIN tzones AS TZ ON (TZ.timezoneid = geo.timezone)
-- LIMIT 100
-- OFFSET 50000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment