2025-02-02     2025-02-03     2025-02-04

large PPL have valid admincode1

number of errors=6
number of warnings=0

select countrycode,name,geonameid,population,admincode1,featurecode,relevance from geoname where population>15000 and featurecode='PPL' and (admincode1 is null or admincode1='00' or not exists (select 1 from geoname b where b.countrycode=geoname.countrycode and b.admincode1=geoname.admincode1 and b.featurecode='ADM1')) and countrycode in (select distinct countrycode from geoname where featurecode='ADM1' and admincode1<>'00') order by population desc

[{key=MA,number=6}]

countrycode	name	geonameid	population	admincode1	featurecode	relevance	
MA	Tabount	2532171	33929	08	PPL	6	
MA	Arfoud	2549356	31971	08	PPL	9	
MA	Rich	2538059	28382	08	PPL	6	
MA	Moulay Ali Cherif	12718664	24251	08	PPL	5	
MA	Reçani	2538027	20469	08	PPL	8	
MA	Kelaat Mgouna	2549981	18515	08	PPL	8