Skip to content

Instantly share code, notes, and snippets.

@booo
Created July 30, 2011 19:10
Show Gist options
  • Select an option

  • Save booo/1115871 to your computer and use it in GitHub Desktop.

Select an option

Save booo/1115871 to your computer and use it in GitHub Desktop.
sort on the value of an hstore
SELECT id, tags->'amenity' AS value, tags FROM nodes WHERE tags ? 'amenity' ORDER BY tags->'amenity';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment