Skip to content

Instantly share code, notes, and snippets.

@AbelVM
AbelVM / 0_query.sql
Last active June 23, 2018 04:15
geocoding + routing + named + static
WITH point1 AS (
SELECT cdb_geocode_postalcode_point(<%= postcode1 %>, 'USA') as geo
),
point2 AS (
SELECT cdb_geocode_postalcode_point(<%= postcode2 %>, 'USA') as geo
),
route AS (
SELECT
r.shape as geo,
r.length