query-8c4fef13b613927cf0962fccc16e5e61
title: Query to retrieve the current active Minister without Portfolio (as per July 2024) (should be 3) SELECT ?minister ?ministerLabel ?startTime WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?minister p:P39 ?statement. ?statement ps:P39 wd:Q109928852; pq:P580 ?startTime. FILTER NOT EXISTS { ?statement pq:P582 ?endTime. } } ORDER BY ?startTime
Use at
- https://query.wikidata.org/sparql
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#>
#title: Query to retrieve the current active Minister without Portfolio (as per July 2024) (should be 3)
SELECT ?minister ?ministerLabel ?startTime WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?minister p:P39 ?statement.
?statement ps:P39 wd:Q109928852;
pq:P580 ?startTime.
FILTER NOT EXISTS { ?statement pq:P582 ?endTime. }
}
ORDER BY ?startTime
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?endTime")
v4("?minister"):::projected
v1("?startTime"):::projected
v2("?statement")
c8(["wd:Q109928852"]):::iri
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P582"--> e0v2
e0v2("?endTime"):::projected
e0v1("?statement"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
v2 --"p:qualifier/P582"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
v4 --"p:P39"--> v2
v2 --"p:statement/P39"--> c8
v2 --"p:qualifier/P580"--> v1