query-115f5c8b3583c1c8999762ee3c4cac22
Parteivorsitzende deutscher Parteien
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?partyLabel ?ordinal ?chairLabel ?start ?end ((?end-?start) AS ?days) WHERE {
VALUES ?party {wd:Q49762 wd:Q49768 wd:Q49763 wd:Q49766 wd:Q6721203}
?party p:P488 ?chairStatement .
?chairStatement v:P488 ?chair .
OPTIONAL{?chairStatement pq:P1545 ?ordinal}
OPTIONAL{?chairStatement pq:P580 ?start}
OPTIONAL{?chairStatement pq:P582 ?end}
SERVICE wikibase:label{bd:serviceParam wikibase:language "de"}
}
ORDER BY ?partyLabel ASC(xsd:integer(?ordinal)) ?start
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?chair")
v5("?chairStatement")
v8("?days")
v7("?end"):::projected
v2("?ordinal"):::projected
v4("?party")
v1("?partyLabel"):::projected
v3("?start"):::projected
c9(["de"]):::literal
c7(["bd:serviceParam"]):::iri
bind0[/VALUES ?party/]
bind0-->v4
bind00(["wd:Q49762"])
bind00 --> bind0
bind01(["wd:Q49768"])
bind01 --> bind0
bind02(["wd:Q49763"])
bind02 --> bind0
bind03(["wd:Q49766"])
bind03 --> bind0
bind04(["wd:Q6721203"])
bind04 --> bind0
v4 --"p:P488"--> v5
v5 --"p:statement/P488"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P1545".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P580".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P582".-> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind1[/"?end - ?start"/]
v7 --o bind1
v3 --o bind1
bind1 --as--o v8