query-f30f8dbc22cde8b953590ee92c32403c
This is the full set of "normal qualifiers" for a term - start/end dates, party, seat represented, election that began the period, and end-cause to end it. However, asking for all qualifiers requires that they be present - which of course will cause problems for any current MP, as their terms have not ended!
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 ?person WHERE
{
?person wdt:P31 wd:Q5 . ?person p:P39 ?ps .
?ps ps:P39 ?term . ?term wdt:P279 wd:Q16707842 .
?ps pq:P580 ?start . ?ps pq:P4100 ?party . ?ps pq:P768 ?seat .
OPTIONAL { ?ps pq:P2715 ?election } .
OPTIONAL { ?ps pq:P582 ?end } .
OPTIONAL { ?ps pq:P1534 ?cause } .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v9("?cause")
v7("?election")
v8("?end")
v5("?party")
v1("?person"):::projected
v2("?ps")
v6("?seat")
v4("?start")
v3("?term")
c2(["wd:Q5"]):::iri
c6(["wd:Q16707842"]):::iri
v1 --"p:direct/P31"--> c2
v1 --"p:P39"--> v2
v2 --"p:statement/P39"--> v3
v3 --"p:direct/P279"--> c6
v2 --"p:qualifier/P580"--> v4
v2 --"p:qualifier/P4100"--> v5
v2 --"p:qualifier/P768"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P2715".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P582".-> v8
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1534".-> v9
end