2025-03-03     2025-03-04     2025-03-05

country codes in cc2 also in hierarchy

number of errors=0
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