number of errors=0
number of warnings=0
select countrycode,name,geonameid,admincode1,admincode2,admincode3 from geoname where countrycode in ('AT','CH','DE','DK','ES','FI','FR','GB','IT','NL','NO','SE','US','CA','AU','NZ','JP') and featurecode='PPLA3' and (admincode1 is null or admincode1='00' or admincode2 is null or admincode3 is null or not exists (select 1 from geoname b where b.countrycode=geoname.countrycode and b.admincode1=geoname.admincode1 and b.admincode2=geoname.admincode2 and b.admincode3=geoname.admincode3 and b.featurecode='ADM3')) order by countrycode
countrycode name geonameid admincode1 admincode2 admincode3