query-c2d9315a8d029686a7354b6b059af4b9
Married Couples in the UK Parliament, who's notable for having both her husband, and her sister, also be MPs. So I was curious how many other spousal pairs have sat in Parliament. SPARQL to the rescue: (Q30234240)Ellie Reeves last week was (Q6581072)female One of the newly elected
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 bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?person1 ?person1Label ?person2 ?person2Label
WHERE {
?person1 wdt:P39 wd:Q16707842 ; wdt:P21 wd:Q6581072 .
?person2 wdt:P39 wd:Q16707842 .
{ ?person1 wdt:P26 ?person2 } UNION { ?person2 wdt:P26 ?person1 }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?person1"):::projected
v2("?person2"):::projected
c7(["bd:serviceParam"]):::iri
c2(["wd:Q16707842"]):::iri
c9(["en"]):::literal
c4(["wd:Q6581072"]):::iri
v1 --"wdt:P39"--> c2
v1 --"wdt:P21"--> c4
v2 --"wdt:P39"--> c2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P26"--> v1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P26"--> v2
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end