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

cities5000 with Wikipedia link have valid admincode1

number of errors=14
number of warnings=0
Group=ckgGrpWP

select countrycode,name,geonameid,population,admincode1,featurecode,relevance from geoname where isCities5000 and featurecode<>'PPLC'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 i18nname like '%en.wikipedia.org%' and countrycode in (select distinct countrycode from geoname where featurecode='ADM1' and admincode1<>'00') and geonameid not in (443093,1819609,12747063,12747064) order by relevance desc

[{key=MA,number=14}]

countrycode	name	geonameid	population	admincode1	featurecode	relevance	
MA	Errachidia	7280528	100870	08	PPLA3	14	
MA	Ouarzazate	2540850	77603	08	PPLA2	12	
MA	Arfoud	2549356	31971	08	PPL	9	
MA	Reçani	2538027	20469	08	PPL	8	
MA	Zagora	2526452	43752	08	PPLA3	8	
MA	Tinghir	2527915	45911	08	PPLA2	8	
MA	Kelaat Mgouna	2549981	18515	08	PPL	8	
MA	Boudenib	2555009	12419	08	PPL	8	
MA	Jorf	2544968	13433	08	PPLA3	7	
MA	Mhamid	2565267	10000	08	PPL	7	
MA	Tounfit	2526710	8920	08	PPL	7	
MA	Gourrama	2548601	6129	08	PPL	7	
MA	Tinajdad	2527925	9764	08	PPL	7	
MA	Alnif	2558398	5162	08	PPLA3	6