I'd like to show a number of points on a mapbox with it's coords coming from a Retool database table.
My table has columns "lat" and "long" with the correct values (as float8). I use this query to retrieve the data:
SELECT "b".name AS "id", "b".long AS "longitude", "b".lat AS "latitude" FROM "myBuildingList" AS "b" WHERE "b".long <> 0 ORDER BY ID
You probably only want the lat and long values so you can just pull those values from that data set or you can use a Query with JSON to pull the long and lat from it.... select longitude, latitude from {{yourdataset.data)) so that you have something like: