query-f9c4f92cb21e0815bf7e8bf48317d12b
(P580)start time (P582)end time
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?position ?positionLabel ?starttime ?endtime WHERE {
?item p:P39 ?positionStatement.
?positionStatement ps:P39 ?position.
?position wdt:P361 wd:Q4206677.
?positionStatement pq:P580 ?starttime.
FILTER(NOT EXISTS { ?positionStatement pq:P582 ?endtime. })
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC (?starttime)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?endtime"):::projected
v4("?item"):::projected
v5("?position"):::projected
v2("?positionStatement")
v1("?starttime"):::projected
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c5(["wd:Q4206677"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P582"--> e0v2
e0v2("?endtime"):::projected
e0v1("?positionStatement"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
v2 --"p:qualifier/P582"--> v3
v4 --"p:P39"--> v2
v2 --"p:statement/P39"--> v5
v5 --"p:direct/P361"--> c5
v2 --"p:qualifier/P580"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end