query-25d02da16c9858c1db6fa7838c1ead6a
- Going back before 1832...As we noted earlier, the data model changes over time. Broadly speaking, parties are complete back to 1923, and term dates and seats are complete back to 1820, but before that things are less comprehensive. A lot of 1801-20 MPs do not have a full set of qualifiers, although all are present and have the relevant term memberships. . In some cases where data is unclear, they may hold the generic GB/English position directly rather than a per-term item, but this is being gradually phased out. (Q96776434)member of the 14th Parliament of Great Britain or (Q60576692)Member of the 1393 Parliament (to 1707), eg (Q18018860)Member of Parliament in the Parliament of England (1707-1800) or (Q18015642)Member of Parliament of Great Britain Prior to 1801, MPs are modelled as holding a position which is a subclass of the value itself. It is needed for GB and English terms, but not post-1800 ones. or of these MPs: note the use of the P279* format, where the asterisk (similar to the plus sign above) means "zero or more", and effectively says that we would like to find things that are a subclass of the value, allThis query will obtain
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 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 }
UNION
{ ?person wdt:P31 wd:Q5 . ?person p:P39 ?ps . ?ps ps:P39 ?term . ?term wdt:P279* wd:Q18015642 }
UNION
{ ?person wdt:P31 wd:Q5 . ?person p:P39 ?ps . ?ps ps:P39 ?term . ?term wdt:P279* wd:Q18018860 }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?person"):::projected
v2("?ps")
v3("?term")
c8(["wd:Q18018860"]):::iri
c2(["wd:Q5"]):::iri
c6(["wd:Q16707842"]):::iri
c7(["wd:Q18015642"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> c2
v1 --"p:P39"--> v2
v2 --"p:statement/P39"--> v3
v3 --"p:direct/P279"--> c8
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> c2
v1 --"p:P39"--> v2
v2 --"p:statement/P39"--> v3
v3 --"p:direct/P279"--> c7
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> c2
v1 --"p:P39"--> v2
v2 --"p:statement/P39"--> v3
v3 --"p:direct/P279"--> c6
end
union0r <== or ==> union0l
end