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 6316690 3404464 Cachoeira Grande 13 13 BR 3404464 6316690 Cachoeira Grande 13 13 BR 3401833 6316907 Condado 17 17 BR 6316907 3401833 Condado 17 17 BR 12958550 6318032 Porto Rico do Maranhão 13 13 BR 6318032 12958550 Porto Rico do Maranhão 13 13