query-d84185ecd1420b93ae8c4066f566fec2
SPARQL query
Use at
- https://query.wikidata.org/sparql
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 ?wikidata WHERE {
?wikidata p:P39 ?ps .
?ps ps:P39 wd:Q18915989 ; pq:P2937 wd:Q28846500 .
OPTIONAL { ?ps pq:P582 ?end }
FILTER(!BOUND(?end) || ?end > NOW())
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?end")
v3("?ps")
v2("?wikidata"):::projected
c5(["wd:Q28846500"]):::iri
c3(["wd:Q18915989"]):::iri
f0[["(not bound(?end) || ?end > NOW())"]]
f0 --> v1
v2 --"p:P39"--> v3
v3 --"p:statement/P39"--> c3
v3 --"p:qualifier/P2937"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P582".-> v1
end