As a follow up to my previous post on setting up a
local instance of OSM data in a PostGIS DB,
this post is a list of useful queries I've come up with (or borrowed*) to get useful results
out of the OSM data
Once you are on the command line, run psql to drop into the postgres sql shell and run the \d
command, which should give you the list of tables and views as below.
Useful queries
Retrieve all cities in alphabetical order:
Retrieve all suburbs in alphabetical order: