Today I have to repeat the code, in case this GEO function
SELECT *,round(geo(-46.000000,-23.000000,latitude,longitude),3) AS distancia
FROM view_empresas_pins
where round(geo(-46.000000,-23.000000,latitude,longitude),3) <= 7
I would like to do something like this:
SELECT *,round(geo(-46.000000,-23.000000,latitude,longitude),3) AS distancia
FROM view_empresas_pins where distancia <= 7
where the result of the GEO function is used in the where, without having to call again.