query-de15fa329e2b8cd9bab334277483e068
Biblioteche in Toscana con ISIL uguale a PEA presente in un altro elemento SELECT ?i ?iLabel ?cod ?i2 ?i2Label { ?i (wdt:P131)* wd:Q1273 . ?i wdt:P131 ?inst . ?inst wdt:P625 ?instcoord . OPTIONAL { ?i wdt:P625 ?coord . } BIND(IF(BOUND(?coord),'biblio','comune') AS ?layer) ?i wdt:P791 ?cod . ?i2 wdt:P7764 ?cod . FILTER(STR(?i)<STR(?i2)) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". } } ORDER BY ?cod
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#>
#Biblioteche in Toscana con ISIL uguale a PEA presente in un altro elemento
SELECT ?i ?iLabel ?cod ?i2 ?i2Label {
?i (wdt:P131)* wd:Q1273 .
?i wdt:P131 ?inst .
?inst wdt:P625 ?instcoord .
OPTIONAL { ?i wdt:P625 ?coord . }
BIND(IF(BOUND(?coord),'biblio','comune') AS ?layer)
?i wdt:P791 ?cod .
?i2 wdt:P7764 ?cod .
FILTER(STR(?i)<STR(?i2))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
}
ORDER BY ?cod
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?cod"):::projected
v6("?coord")
v2("?i"):::projected
v3("?i2"):::projected
v4("?inst")
v5("?instcoord")
v7("?layer")
c9(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal
c7(["bd:serviceParam"]):::iri
c2(["wd:Q1273"]):::iri
f0[["str(?i) < str(?i2)"]]
f0 --> v2
f0 --> v3
v2 --"wdt:P131"--> c2
v2 --"wdt:P131"--> v4
v4 --"wdt:P625"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v6
end
bind1[/"if(bound(?coord),'biblio','comune')"/]
v6 --o bind1
bind1 --as--o v7
v2 --"wdt:P791"--> v1
v3 --"wdt:P7764"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end