2025-02-28     2025-03-01     2025-03-02

linked countrysubdivs have admincode and featureclass A

number of errors=1
number of warnings=0
Group=chkGrpSubdivision

select countrycode,name,iso_3166_2,fips,geonamesadmcode,subdivisionid from countrysubdivision where validtill is null and not exists (select 1 from geoname where subdivisionid=geonameid and featureclass='A' and featurecode in ('ADM1','ADM2','ADM3','ADM4') and (admincode1=geonamesadmcode or admincode2=geonamesadmcode or admincode3=geonamesadmcode)) and subdivisionid is not null order by countrycode,name

countrycode	name	iso_3166_2	fips	geonamesadmcode	subdivisionid	
AZ	Naxçivan	NV	75	75	8411069