query-79d75deda08dce5b44182f0b86f3fcc5
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#>
SELECT ?department ?departmentLabel WHERE {
?department wdt:P31 wd:Q6465;
OPTIONAL {
?department wdt:P582|wdt:P576 ?ended.
}
FILTER(!BOUND(?ended)).
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?department"):::projected
v1("?ended")
c6(["bd:serviceParam"]):::iri
c8(["fr,en"]):::literal
c2(["wd:Q6465"]):::iri
f0[["not bound(?ended)"]]
f0 --> v1
v2 --"wdt:P31"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 -."wdt:P576".-> v1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P582"--> v1
end
union0r <== or ==> union0l
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end