I am trying to return this query with the four nearest neighbours but cannot get the syntax right as im new to postgis. This should be simple for someone with experience with postgis. Would really appreciate help with this one.
var query3 = $.getJSON(('[url removed, login to view] * FROM "mapcomm-admin".permaculture_groups_gb_sct ORDER BY ST_Distance("mapcomm-admin".[url removed, login to view] <-> SRID=26918;POINT(583571.905921312 4506714.34119218) ::geometry)'));