query-5553f0a5bbdd8b23efce064803c14142
TODO
Use at
- https://query.wikidata.org/sparql
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/>
SELECT DISTINCT ?item ?constituency ?group ?start ?end ?election ?cause WHERE {
?item p:P39 ?stmt;
wdt:P31 wd:Q5.
?stmt ps:P39 wd:Q13218630;
pq:P2937 wd:.
OPTIONAL { ?stmt pq:P768 ?constituency. }
OPTIONAL { ?stmt pq:P4100 ?group. }
OPTIONAL { ?stmt pq:P580 ?start. }
OPTIONAL { ?stmt pq:P582 ?end. }
OPTIONAL { ?stmt pq:P2715 ?election. }
OPTIONAL { ?stmt pq:P1534 ?cause. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?cause"):::projected
v3("?constituency"):::projected
v7("?election"):::projected
v6("?end"):::projected
v4("?group"):::projected
v1("?item"):::projected
v5("?start"):::projected
v2("?stmt")
c7(["wd:"]):::iri
c5(["wd:Q13218630"]):::iri
c3(["wd:Q5"]):::iri
v1 --"p:P39"--> v2
v1 --"p:direct/P31"--> c3
v2 --"p:statement/P39"--> c5
v2 --"p:qualifier/P2937"--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P768".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P4100".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P580".-> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P582".-> v6
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P2715".-> v7
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1534".-> v8
end