query-38fc60b7b436d62cfb71d294798e05b0

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#>
#Archivi in Toscana
#defaultView:Map
SELECT DISTINCT ?i ?iLabel ?iDescription ?coord ?inst ?instLabel
WHERE {
  VALUES ?instance { wd:Q166118 }
  ?i wdt:P31 ?instance .
  ?i (wdt:P131)* wd:Q1273 . 
  ?i wdt:P131 ?inst .
  ?inst wdt:P625 ?instcoord .
  OPTIONAL { ?i wdt:P625 ?icoord . }
  BIND(IF(BOUND(?icoord),?icoord,?instcoord) AS ?coord)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?coord"):::projected v2("?i"):::projected v5("?icoord") v3("?inst"):::projected v1("?instance") v4("?instcoord") c8(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal c6(["bd:serviceParam"]):::iri c3(["wd:Q1273"]):::iri bind0[/VALUES ?instance/] bind0-->v1 bind00(["wd:Q166118"]) bind00 --> bind0 v2 --"wdt:P31"--> v1 v2 --"wdt:P131"--> c3 v2 --"wdt:P131"--> v3 v3 --"wdt:P625"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P625".-> v5 end bind1[/"if(bound(?icoord),?icoord,?instcoord)"/] v5 --o bind1 v4 --o bind1 bind1 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end