query-3105e43d89b689ebf5ffd588062e9998
(8) Graph of mitochondrial DNA descendants of a common ancestor (maternal relatives): Elizabeth IINo.8 (2019.11.07T0522 created)
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#>
# find maternal relatives of Elizabeth II, mitochondrial DNA descendants of a common ancestor
#defaultView:Graph
SELECT DISTINCT ?mtDNA ?mtDNALabel ?birthdate ?image ?mother ?motherLabel ?edgeLabel
WHERE {
# define ?mtDNA as Elizabeth II (Q9682)'s any mother (P25) or child (P40)'s mother or child's...
wd:Q9682 (wdt:P25|wdt:P40)* ?mtDNA.
# limit ?mtDNA's gender (P21) to female (Q6581072)
?mtDNA wdt:P21 wd:Q6581072.
# To eliminate male child's female child (son's daughter),
# define ?mtDNA's any mother (P25)'s mother's... as ?Eve, and
?mtDNA wdt:P25* ?Eve.
# require ?Eve to be Elizabeth II (Q9682)'s any mother (P25)'s mother's...
wd:Q9682 wdt:P25* ?Eve
# optional: define ?mtDNA's mother (P25) as ?mother
OPTIONAL {?mtDNA wdt:P25 ?mother.
# show mother (P25) on graph edges
?edge wikibase:directClaim wdt:P25;
a wikibase:Property}
# optional: show ?mtDNA's birthdate (P569), which only appears in table, not graph
OPTIONAL {?mtDNA wdt:P569 ?birthdate}
# optional: show ?mtDNA's image (P18), which appears directly in graph, and as link in table
OPTIONAL {?mtDNA wdt:P18 ?image}
# show label in simplified Chinese (zh-hans) as default, and English when no default label exists
SERVICE wikibase:label { bd:serviceParam wikibase:language "zh-hans,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?Eve")
v5("?birthdate"):::projected
v4("?edge")
v6("?image"):::projected
v3("?mother"):::projected
v1("?mtDNA"):::projected
c8(["wikibase:Property"]):::iri
c5(["wd:Q6581072"]):::iri
c14(["zh-hans,en"]):::literal
c2(["wdt:P25"]):::iri
c12(["bd:serviceParam"]):::iri
c1(["wd:Q9682"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P40"--> v1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
c1 -->c2--> v1
end
union0r <== or ==> union0l
end
v1 --"wdt:P21"--> c5
v1 -->c2--> v2
c1 -->c2--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -->c2--> v3
v4 -."wikibase:directClaim".-> c2
v4 --"a"--> c8
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P569".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end