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