select c.name as county, min(sqrt(pow(69.1*(p1.latitude-56.17),2)+ pow(53*(abs(p1.longitude--3.04)),2))) as dist
from places p1,county c
where sqrt(pow(69.1*(p1.latitude-56.17),2)+ pow(53*(abs(p1.longitude--3.04)),2)) < 30
and p1.county_id=c.county_id
and p1.name != "Buckhaven"
and c.name != "Fife"
group by c.name
order by dist
limit 6