number of errors=2
number of warnings=0
select a.countrycode,a.geonameid,b.geonameid,a.name,a.admincode1,b.admincode1 from geoname a, geoname b where a.geonameid <> b.geonameid and a.featureclass='P' and b.featureclass='P' and lower(a.name)=lower(b.name) and a.longlat<->b.longlat<0.015 and a.iscities1000 and b.iscities1000 and a.admincode1=b.admincode1
countrycode geonameid geonameid name admincode1 admincode1 BR 3453802 6316488 Balneário Pinhal 23 23 BR 6316488 3453802 Balneário Pinhal 23 23