query: SELECT (GROUP_CONCAT(CONCAT("|",?dist,"=",str(?count))) as ?all)
  WITH
  {  
    SELECT ?dist (COUNT(DISTINCT ?item) as ?count)
    {
      ?entry wdt:P1433 wd:Q665807 ; wdt:P921 ?item .
      ?item wdt:P19 ?place .
      ?place wdt:P964 ?value .
      ?item wdt:P31 wd:Q5 .
      
      BIND(IF(substr(?value,1, 1) = "9", "900", substr(?value,1, 3)) as ?dist)
    }
    GROUP BY ?dist
    ORDER BY DESC(?dist)          
  } as %a
  WHERE
  {
    INCLUDE %a
  }          