Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
GTFS: Select stops with associated routes (works on a database build from gtfs files, one table per file)
SELECT DISTINCT stops.stop_name, routes.route_long_name from stops
INNER join stop_times on stop_times.stop_id=stops.stop_id
INNER join trips on trips.trip_id=stop_times.trip_id
INNER join routes on routes.route_id=trips.route_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment