query-fa7cdc714ca8249d9a1d2fd143298129
TODO
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#>
# coses de Barcelona sense barri (o districte)
SELECT DISTINCT ?item ?itemLabel ?layer ?layerLabel ?coord WHERE {
?item wdt:P31 ?layer.
?item wdt:P131+ wd:Q1492.
?item wdt:P625 ?coord.
OPTIONAL {
?item wdt:P131+ ?div.
?div wdt:P31 wd:Q75135432 # barri Q75135432, districte Q790344.
}
FILTER (!BOUND(?div))
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,en,es,fr,de" .
}
}
#defaultView:Map
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?coord"):::projected
v1("?div")
v2("?item"):::projected
v3("?layer"):::projected
c7(["bd:serviceParam"]):::iri
c5(["wd:Q75135432"]):::iri
c3(["wd:Q1492"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,ca,en,es,fr,de"]):::literal
f0[["not bound(?div)"]]
f0 --> v1
v2 --"wdt:P31"--> v3
v2 --"wdt:P131"--> c3
v2 --"wdt:P625"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P131".-> v1
v1 --"wdt:P31"--> c5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end