When applying the following query to my javascript I get this error:
SELECT c.addressno,
ST_Distance(c.the_geom,
(SELECT the_geom FROM test_alignment_poly ORDER BY the_geom <-> c.the_geom LIMIT 1))
as MinDistance FROM address_pt_subset c where c.addressno='8635'
{"error":["column \"the_geom\" does not exist"]}
After some research I found cartodb projections tutorial after applying the following information I was able to get the following query to work on the map view of the dash board:
SELECT c.addressno,the_geom_webmercator,cartodb_id,ST_Distance(c.the_geom,(SELECT
the_geom FROM test_alignment_poly ORDER BY the_geom <-> c.the_geom LIMIT 1))as
MinDistance FROM address_pt_subset c where c.addressno='8635'
Though as stated above when applying the same query to the API I still get a geom error.
Is the nested geom value causing the error?
I have tried many variation of transforming both geom values without success. I feel like I am close but I have run out of ideas.