query-e26346c40c0c0e358cba5ba914be8216

rq turtle/ttl

title:Lista degli IRIS per regione SELECT ?iris ?irisLabel ?uni ?uniLabel ?sigla ?regioneLabel ?p WHERE { ?iris wdt:P408 wd:Q107492957 . ?iris wdt:P126 ?uni . OPTIONAL { ?uni wdt:P1813 ?sigla . } OPTIONAL { ?iris wdt:P1687 ?p . } OPTIONAL { ?uni wdt:P131 ?regione . ?regione wdt:P31/wdt:P279 wd:Q16110 . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY ?regioneLabel

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:Lista degli IRIS per regione
SELECT ?iris ?irisLabel ?uni ?uniLabel ?sigla ?regioneLabel ?p
WHERE {
  ?iris wdt:P408 wd:Q107492957 .
  ?iris wdt:P126 ?uni . 
  OPTIONAL { ?uni wdt:P1813 ?sigla . }
  OPTIONAL { ?iris wdt:P1687 ?p . }
  OPTIONAL { ?uni wdt:P131* ?regione . ?regione wdt:P31/wdt:P279* wd:Q16110 . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?regioneLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?iris"):::projected v5("?p"):::projected v6("?regione") v1("?regioneLabel"):::projected v4("?sigla"):::projected v3("?uni"):::projected a1((" ")) c2(["wd:Q107492957"]):::iri c11(["bd:serviceParam"]):::iri c9(["wd:Q16110"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P408"--> c2 v2 --"wdt:P126"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P1813".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1687".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P131".-> v6 v6 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c9 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end