query-007c198ea38ae1bfdcf5f50c55114741

rq turtle/ttl

was filled in for both people) — as quite a few of them weren't). There are also bound to be people missing from this, who don't have their marriage recorded in Wikidata — anyone who knows any should add them! (P26)spouse instead. I considered filtering by lower birth-date, but that won't work if any couples were actually born on the same day, or, in the sibling case, if they were twins. Perhaps filtering by the first person having a lower ID than the second might be a better way to go, but I'm not entirely sure how to do that, or if there's a better approach. (NB: I've also made sure that all the relationships currently returned here are symmetrical — i.e. that the (P3373)sibling I'm not entirely happy with this query. To avoid getting each pair duplicated, I'm currently filtering by "person1" being female. As I don't believe the UK has had any male-male married couples yet, that will give us the correct results, but it's not very future-proof, or adaptable to other countries that might have. It also won't work if we do a similar query for ). Would also be interesting to find cases where couples aren't from the same party. (Q11007)House of Lords being married to someone contemporaneously in the (Q11005)House of Commons It would also be interesting to adjust this to check (a) whether they served at the same time (I know of cases in other countries where a wife took over the seat held by her recently deceased husband); (b) for cases that cross-houses (e.g. someone in the A version for the US, spanning both Representatives and Senators:

Use at

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 { 
  wd:Q11268 wdt:P527 ?house1 .
  wd:Q11268 wdt:P527 ?house2 .
  ?person1 wdt:P39 [ wdt:P361 ?house1 ; wdt:P279* wd:Q4175034 ] ; wdt:P21 wd:Q6581072 .
  ?person2 wdt:P39 [ wdt:P361 ?house2 ; wdt:P279* wd:Q4175034 ] .
  { ?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("?house1") v2("?house2") v3("?person1"):::projected v4("?person2"):::projected a1((" ")) a2((" ")) c13(["en"]):::literal c8(["wd:Q6581072"]):::iri c11(["bd:serviceParam"]):::iri c5(["wd:Q4175034"]):::iri c1(["wd:Q11268"]):::iri c1 --"wdt:P527"--> v1 c1 --"wdt:P527"--> v2 a1 --"wdt:P361"--> v1 a1 --"wdt:P279"--> c5 v3 --"wdt:P39"--> a1 v3 --"wdt:P21"--> c8 a2 --"wdt:P361"--> v2 a2 --"wdt:P279"--> c5 v4 --"wdt:P39"--> a2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P26"--> v3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P26"--> v4 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end