query-6766310e4b06115090c2db06c27cf619
Wikidata entries for FO & FCO employees who are not British ambassadors and high commissioners
select distinct ?person ?personLabel ?birthyear ?deathyear where
{
values ?employer {wd:Q358834 wd:Q58211956} # Foreign Office or Foreign & Commonwealth Office
?person wdt:P108 ?employer . # FO or FCO employs the person
filter not exists {?person p:P39 ?positionStatement .
?positionStatement ps:P39 ?position .
?position wdt:P31 wd:Q56760832 .} # Person not a High Commissioner
filter not exists {?person p:P39 ?positionStatement .
?positionStatement ps:P39 ?position .
?position wdt:P31 wd:Q18115939 .} # Person not an ambassador
optional { ?person wdt:P569 ?born . bind(year(?born) as ?birthyear) } # birthyear
optional { ?person wdt:P570 ?died . bind(year(?died) as ?deathyear) } # deathyear
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by ?personLabel
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Wikidata entries for FO & FCO employees who are not British ambassadors and high commissioners
select distinct ?person ?personLabel ?birthyear ?deathyear where
{
values ?employer {wd:Q358834 wd:Q58211956} # Foreign Office or Foreign & Commonwealth Office
?person wdt:P108 ?employer . # FO or FCO employs the person
filter not exists {?person p:P39 ?positionStatement .
?positionStatement ps:P39 ?position .
?position wdt:P31 wd:Q56760832 .} # Person not a High Commissioner
filter not exists {?person p:P39 ?positionStatement .
?positionStatement ps:P39 ?position .
?position wdt:P31 wd:Q18115939 .} # Person not an ambassador
optional { ?person wdt:P569 ?born . bind(year(?born) as ?birthyear) } # birthyear
optional { ?person wdt:P570 ?died . bind(year(?died) as ?deathyear) } # deathyear
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by ?personLabel