query-3d8e48be157aa7c968b1ccc2197ee556

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Mappa dei luoghi di nascita piĆ¹ frequenti per le singole persone aventi almeno un IRIS
#defaultView:Map
SELECT DISTINCT ?l ?lLabel ?coord ?number ?layer
WHERE
{

{
  SELECT DISTINCT ?l ?lLabel ?coord (COUNT(DISTINCT ?item) AS ?number)
  WHERE 
  {
  ?iris wikibase:directClaim ?irisst ; wdt:P9073 [ wdt:P408 wd:Q107492957 ] .
  ?item ?irisst ?irisid .
  ?item wdt:P19 ?l . ?l wdt:P625 ?coord .
  }
  GROUP BY ?l ?lLabel ?coord ?number
}  BIND( IF(?number < 3, "1-2", IF(?number < 6, "3-5", IF(?number < 16, "6-15","16+"))) AS ?layer) 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
GROUP BY ?l ?lLabel ?coord ?number ?layer
ORDER BY DESC(?number)

Query found at