query-525e5f56a4403392d1891c92cf7730dd
People who have held a position in the Air Training Corps
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#>
#defaultView:Table
SELECT ?person ?personLabel ?positionLabel ?start_time ?end_time
WHERE
{
?person wdt:P31 wd:Q5 . # human
?person p:P39 [ ps:P39 ?position; pq:P642 wd:Q4698217] . # position held - ? - of - Air Training Corps
OPTIONAL{?person p:P39 [ ps:P39 ?position; pq:P580 ?start_time]} # start time
OPTIONAL{?person p:P39 [ ps:P39 ?position; pq:P582 ?end_time]} # end time
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY (?start_time)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?end_time"):::projected
v2("?person"):::projected
v3("?position")
v1("?start_time"):::projected
a1((" "))
a2((" "))
a3((" "))
c5(["wd:Q4698217"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;"]):::literal
c2(["wd:Q5"]):::iri
v2 --"p:direct/P31"--> c2
a1 --"p:statement/P39"--> v3
a1 --"p:qualifier/P642"--> c5
v2 --"p:P39"--> a1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a2 -."p:statement/P39".-> v3
a2 --"p:qualifier/P580"--> v1
v2 --"p:P39"--> a2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
a3 -."p:statement/P39".-> v3
a3 --"p:qualifier/P582"--> v4
v2 --"p:P39"--> a3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end