query-0dc9d133e576131bc1a55c5a6d29d89e
Archivi in Toscana - solo import PEA SELECT DISTINCT ?i ?iLabel ?iDescription ?coord ?inst ?instLabel ?instcoord ?pea WHERE { ?i wdt:P31 wd:Q166118 . ?i (wdt:P131)* wd:Q1273 . ?i wdt:P131 ?inst . ?inst wdt:P625 ?instcoord . ?i wdt:P7764 ?pea . OPTIONAL { ?i wdt:P625 ?coord . } BIND(IF(BOUND(?coord),'archiv','comune') AS ?layer) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". } }
Use at
- https://query.wikidata.org/sparql
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 - solo import PEA
SELECT DISTINCT ?i ?iLabel ?iDescription ?coord ?inst ?instLabel ?instcoord ?pea
WHERE {
?i wdt:P31 wd:Q166118 .
?i (wdt:P131)* wd:Q1273 .
?i wdt:P131 ?inst .
?inst wdt:P625 ?instcoord .
?i wdt:P7764 ?pea .
OPTIONAL { ?i wdt:P625 ?coord . }
BIND(IF(BOUND(?coord),'archiv','comune') AS ?layer)
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;
v5("?coord"):::projected
v1("?i"):::projected
v2("?inst"):::projected
v3("?instcoord"):::projected
v6("?layer")
v4("?pea"):::projected
c10(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal
c2(["wd:Q166118"]):::iri
c8(["bd:serviceParam"]):::iri
c4(["wd:Q1273"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P131"--> c4
v1 --"wdt:P131"--> v2
v2 --"wdt:P625"--> v3
v1 --"wdt:P7764"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v5
end
bind0[/"if(bound(?coord),'archiv','comune')"/]
v5 --o bind0
bind0 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end