query-359e7427e7ac5d48f8a42cfeaa30efd9
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT DISTINCT ?country WHERE {
wd:Q6556803 wdt:P131* ?area .
?area wdt:P17 ?country .
OPTIONAL {
wd:Q6556803 wdt:P131*/p:P131 [
pq:P582 ?endTime; ps:P131/wdt:P131* ?area
] .
} .
FILTER( !BOUND( ?endTime ) ) .
}
Query found at
- https://www.wikidata.org/wiki/User:Jarekt/queries
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2017/06
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?area")
v3("?country"):::projected
v1("?endTime")
a3((" "))
a1((" "))
a2((" "))
c1(["wd:Q6556803"]):::iri
f0[["not bound(?endTime)"]]
f0 --> v1
c1 --"p:direct/P131"--> v2
v2 --"p:direct/P17"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a1 -."p:qualifier/P582".-> v1
a1 --"p:statement/P131"--> a2
a2 --"p:direct/P131"--> v2
c1 --"p:direct/P131"--> a3
a3 --"p:P131"--> a1
end