number of errors=6
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.005 and a.iscities500 and b.iscities500 and a.admincode1=b.admincode1
countrycode geonameid geonameid name admincode1 admincode1 BR 3461996 6317063 Engenheiro Coelho 27 27 BR 6317063 3461996 Engenheiro Coelho 27 27 BR 6317494 3458383 Luciara 14 14 BR 3458383 6317494 Luciara 14 14 BR 3392369 6317925 Penaforte 06 06 BR 6317925 3392369 Penaforte 06 06