query: SELECT ?item ?label ?area ?population ?pit ?rank
  WHERE
  {
    {?item wdt:P31 wd:Q29414133 .}
    optional {?item p:P1082 [ps:P1082 ?pop; pq:P585 ?pointintime; wikibase:rank ?rank]. filter (?rank=wikibase:PreferredRank).}
    optional {?item p:P1082 [ps:P1082 ?population2; pq:P585 ?pit2; wikibase:rank ?rank2]. filter (?pointintime!=?pit) filter (?rank2=wikibase:PreferredRank).}
    bind(if(bound(?rank2),"",?pop) as ?population)
    bind(if(bound(?rank2),"",?pointintime) as ?pit)
    optional {?item wdt:P2046 ?a .}
    BIND(REPLACE(STR(?a),"\\.",",") AS ?area) .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }