query-0792e9a41d51a92227824dc8816f18cf
Current Minister Presidents of German states
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 bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
SELECT ?president ?stateLabel ?presidentLabel ?birthday ?since (FLOOR(NOW()-?since) AS ?daysInOffice) WHERE {
?president p:P39 ?position .
?president wdt:P569 ?birthday .
?position pq:P580 ?since
FILTER NOT EXISTS {?position pq:P582 ?end}
?position v:P39 ?positionItem .
?positionItem wdt:P279 wd:Q23833126 .
?positionItem wdt:P1001 ?state
SERVICE wikibase:label{bd:serviceParam wikibase:language "de"}
} ORDER BY ?daysInOffice
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?birthday"):::projected
v9("?daysInOffice")
v3("?end")
v2("?position")
v7("?positionItem")
v4("?president"):::projected
v6("?since"):::projected
v8("?state")
c12(["de"]):::literal
c10(["bd:serviceParam"]):::iri
c7(["wd:Q23833126"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P582"--> e0v2
e0v2("?end"):::projected
e0v1("?position"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
v2 --"p:qualifier/P582"--> v3
v4 --"p:P39"--> v2
v4 --"p:direct/P569"--> v5
v2 --"p:qualifier/P580"--> v6
v2 --"p:statement/P39"--> v7
v7 --"p:direct/P279"--> c7
v7 --"p:direct/P1001"--> v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind1[/"numeric-floor(NOW() - ?since)"/]
v6 --o bind1
bind1 --as--o v9