2025-07-11     2025-07-12     2025-07-13

country codes in cc2 also in hierarchy

number of errors=5
number of warnings=0
Group=chkGrpHierarchy

select g.geonameid,g.name,g.countrycode,g.featurecode,g.cc2,g.population,g.relevance,c.geonameid,c.countrycode from geoname g, geoname c where g.featureclass='L' and g.cc2 is not null and length(g.cc2)>6 and g.cc2 like '%' || c.countrycode || '%' and c.featurecode like 'PCL%' and c.featurecode <>'PCLH' and g.featurecode not in ('CONT') and g.geonameid not in (3496393,6255148,10861432,3571219,7730009,224132,11820677,2425938,11919717,3066138,7729901,2390933,12217933,12212804,1579995,10941926,689067) and not exists (select 1 from geoname_hierarchy where g.geonameid=parentid and c.geonameid=childid) order by g.relevance desc,g.geonameid

geonameid	name	countrycode	featurecode	cc2	population	relevance	geonameid	countrycode	
3607313	Mosquitia	null	RGN	CO,CR,HN,NI,PA	null	12	3617476	NI	
3607313	Mosquitia	null	RGN	CO,CR,HN,NI,PA	null	12	3703430	PA	
3607313	Mosquitia	null	RGN	CO,CR,HN,NI,PA	null	12	3686110	CO	
3607313	Mosquitia	null	RGN	CO,CR,HN,NI,PA	null	12	3608932	HN	
3607313	Mosquitia	null	RGN	CO,CR,HN,NI,PA	null	12	3624060	CR