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

region with population as sum of countries

number of errors=0
number of warnings=0
Group=chkGrpRegion
Group=ckgGrpPopulation

select geonameid,name,population,popsum,pctdiff::int from (select geonameid,name,population,popsum,abs(population-popsum)*100/(population+popsum) as pctdiff from (select p.geonameid,p.name,p.population,round(sum(c.population)/10000)*10000 as popsum from geoname p, geoname_hierarchy, geoname c where p.geonameid=parentid and c.geonameid=childid and p.featureclass='L' and p.featurecode='RGNE' and (c.featurecode like 'PCL%' or c.featurecode='TERR' or c.featurecode like 'ADM%') and p.geonameid not in (select geonameid from qa_exceptions where key='chkPopulationRegionE') group by 1,2,3) subq order by pctdiff desc) pctque where pctdiff>20;

The UN considers Mexico to be part of Central America

geonameid	name	population	popsum	pctdiff