query-62795791abca3b15e9c33985291e939c
First Sturgeon CabinetHere the query gets trickier, as we need to cope with unterminated memberships: | Query: Recent changes | Find images | TABernacle | PetScan | WDQS . Manual changes to the list will be removed on the next update! a botThis list is periodically updated by Manually update list 2023-03-28 2014-11-20 Nicola Sturgeon First Minister of Scotland 2023-03-27 2014-11-21 John Swinney Deputy First Minister of Scotland 2016-05-18 2014-11-21 Alex Neil Cabinet Secretary for Social Justice, Communities and Pensioners' Rights 2016-05-18 2014-11-21 Richard Lochhead Cabinet Secretary for Rural Affairs, Food and Environment 2018-06-26 2014-11-21 Michael Matheson Cabinet Secretary for Justice 2016-05-05 2014-11-21 Keith Brown Cabinet Secretary for Infrastructure, Investment and Cities 2016-05-18 2014-11-21 Shona Robison Cabinet Secretary for Health, Wellbeing and Sport 2016-05-18 2014-11-21 John Swinney Cabinet Secretary for Finance, Constitution and Economy 2016-05-18 2014-11-21 Roseanna Cunningham Cabinet Secretary for Fair Work, Skills and Training 2016-05-18 2014-11-21 Angela Constance Cabinet Secretary for Education and Lifelong Learning 2016-05-18 2014-11-21 Fiona Hyslop Cabinet Secretary for Culture, Europe and External Affairs ?mem_end ?mem_start ?who Article End of automatically generated list.--- The underlying query behind this report is:
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 DISTINCT ?position ?positionLabel ?cabinet_start ?cabinet_end ?who ?whoLabel ?mem_start ?mem_end WHERE {
BIND (wd:Q22120071 AS ?cabinet)
?cabinet wdt:P2670 ?position; wdt:P571 ?cabinet_start .
OPTIONAL { ?cabinet wdt:P576 ?cabinet_end } .
BIND(if(BOUND(?cabinet_end), ?cabinet_end, NOW()) as ?effective_cabinet_end)
OPTIONAL {
?who p:P39 ?mem .
?mem ps:P39 ?position ; pq:P580 ?mem_start .
OPTIONAL { ?mem pq:P582 ?mem_end }
BIND(if(BOUND(?mem_end), ?mem_end, NOW()) as ?effective_end)
FILTER((?effective_end > ?cabinet_start) && (?mem_start < ?effective_cabinet_end))
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?positionLabel ?mem_start
Query found at
- https://www.wikidata.org/wiki/Talk:Q22120071
- https://www.wikidata.org/wiki/User:Oravrattas/daynotes/2017-06-27