query: SELECT (wd:Q5 as ?item) ("coordinates (P625)" as ?legend) (GROUP_CONCAT(?itemLabel;separator = ",") as ?labels) (GROUP_CONCAT(?ct;separator = ",") as ?values)
  {
  	{	SELECT  ?p (COUNT(?entry) as ?ct)
  		{
  			?entry 	wdt:P31 wd:Q39715
            	OPTIONAL { ?entry wdt:P625 ?coor }
            	BIND(IF(!BOUND(?coor),wd:Q22910791,wd:Q24036257) as ?p)
  		}
  		GROUP BY  ?p
  		ORDER BY ASC(?ct)                  
  	}
  	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?p rdfs:label ?itemLabel  }
  }