SELECT *, ST_AsGeoJSON(loc) as location, ST_Distance( loc, ST_GeogFromText('SRID=4326;POINT(-97.7286718 30.3033267)') ) / 1609 as distance FROM food_items WHERE ST_DWithin( loc, ST_GeogFromText('SRID=4326;POINT(-97.7286718 30.3033267)'), 10 * 1609 ) ORDER BY distance ASC;