query-1e4a85fd22f08aafd36cef03151ff2ed

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?person ?personLabel ?positionLabel ?start ?end where
{
  values ?person {wd:Q359442}
  ?person p:P39 ?positionStatement . ?positionStatement ps:P39 ?position . # find positions they held
  optional { ?positionStatement pq:P580 ?start . }
  optional { ?positionStatement pq:P582 ?end . } 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?end"):::projected v1("?person"):::projected v3("?position") v2("?positionStatement") v4("?start"):::projected c6(["bd:serviceParam"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/VALUES ?person/] bind0-->v1 bind00(["wd:Q359442"]) bind00 --> bind0 v1 --"p:P39"--> v2 v2 --"p:statement/P39"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P580".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P582".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end