query-46412d10176071ed9e10603cf80cdb4e

rq turtle/ttl

QA - have we removed redundant position=ambassador?

Use at

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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
select distinct ?person ?personLabel where
{
  { ?position wdt:P31 wd:Q18115939 . } union { ?position wdt:P31 wd:Q56760832 } . # position is UK ambassador or high commissioner
    ?person p:P39 ?positionStatement . ?positionStatement ps:P39 ?position . # find positions they held
    ?person wdt:P39 wd:Q121998.
  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; v2("?person"):::projected v1("?position") v3("?positionStatement") c2(["wd:Q18115939"]):::iri c9(["bd:serviceParam"]):::iri c3(["wd:Q56760832"]):::iri c7(["wd:Q121998"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"p:direct/P31"--> c3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"p:direct/P31"--> c2 end union0r <== or ==> union0l end v2 --"p:P39"--> v3 v3 --"p:statement/P39"--> v1 v2 --"p:direct/P39"--> c7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end