query-44b88e9ce6dc491da92eb39bee078b1d

rq turtle/ttl

(7) Graph of Y chromosome descendants of a common ancestor (paternal relatives): JesusNo.7 (2019.11.06T2048 created)

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#>
# find paternal relatives of Jesus, Y chromosome descendants of a common ancestor
#defaultView:Graph
SELECT DISTINCT ?Y ?YLabel ?birthdate ?image ?father ?fatherLabel ?edgeLabel
WHERE {
  # define ?Y as Jesus (Q302)'s any father (P22) or child (P40)'s father or child's...
  wd:Q302 (wdt:P22|wdt:P40)* ?Y.
  # limit ?Y's gender (P21) to male (Q6581097)
  ?Y wdt:P21 wd:Q6581097.
  # To eliminate female child's male child (daughter's son),
  # define ?Y's any father (P22)'s father's... as ?Adam, and
  ?Y wdt:P22* ?Adam.
  # require ?Adam to be Jesus (Q302)'s any father (P22)'s father's...
  wd:Q302  wdt:P22* ?Adam
  # optional: define ?Y's father (P22) as ?father
  OPTIONAL {?Y wdt:P22 ?father.
            # show father (P22) on graph edges
            ?edge wikibase:directClaim wdt:P22;
               a wikibase:Property}
  # optional: show ?Y's birthdate (P569), which only appears in table, not graph
  OPTIONAL {?Y wdt:P569 ?birthdate}
  # optional: show ?Y's image (P18), which appears directly in graph, and as link in table
  OPTIONAL {?Y 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("?Adam") v1("?Y"):::projected v5("?birthdate"):::projected v4("?edge") v3("?father"):::projected v6("?image"):::projected c8(["wikibase:Property"]):::iri c5(["wd:Q6581097"]):::iri c14(["zh-hans,en"]):::literal c1(["wd:Q302"]):::iri c2(["wdt:P22"]):::iri c12(["bd:serviceParam"]):::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