query-bb2f613e46c411fe364a66bdcfa330b4
TODO
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 ?person ?personLabel ?position ?positionLabel ?st ?et WHERE {
#?person wdt:P39/wdt:P279* wd:Q248352.
?person p:P39 ?pMinister. # 1
?pMinister ps:P39 ?position. # 2
?position wdt:P279* wd:Q248352. # 3
optional { ?pMinister pq:P580 ?st }
optional { ?pMinister pq:P582 ?et }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,[AUTO_LANGUAGE]". }
} order by ?person
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?et"):::projected
v2("?pMinister")
v1("?person"):::projected
v3("?position"):::projected
v4("?st"):::projected
c8(["bd:serviceParam"]):::iri
c10(["en,#91;AUTO_LANGUAGE#93;"]):::literal
c4(["wd:Q248352"]):::iri
v1 --"p:P39"--> v2
v2 --"p:statement/P39"--> v3
v3 --"p:direct/P279"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P580".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P582".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end