SELECT *, (3959 * atan(sqrt(1 - pow((sin(35.4482 / 57.3010001111) * sin(Companies.Latitude / 57.3010001111) + cos(35.4482 / 57.3010001111) * cos(Companies.Latitude / 57.3010001111) * cos(Companies.Longitude / 57.3010001111 - -89.8102 / 57.3010001111)), 2)))) AS dist FROM Companies WHERE Status>0 and (3959 * atan(sqrt(1 - pow((sin(35.4482 / 57.3010001111) * sin(Companies.Latitude / 57.3010001111) + cos(35.4482 / 57.3010001111) * cos(Companies.Latitude / 57.3010001111) * cos(Companies.Longitude / 57.3010001111 - -89.8102 / 57.3010001111)), 2))))<='10' ORDER BY LCi