query-5ec262a9530a145c8d34851fb0bed563

rq turtle/ttl

(43) Graph of extended blood relatives + extended master-disciple relations by single-headed arrows: Guo DegangNo.43 (2020.07.16T2026 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 Guo Degang's extended blood relatives + extended master-disciple relations
### Note: The master-disciple relations in this query (same as those in the previous query "Graph of master-disciple relations: Minoru Kitani", although without the word "extended" in its title) are "extended"
### in that a result may not share a common ancestral point with the original point.
### Because a student might have more than one teacher (as a child has more than one parent), by searching for Guo Degang's teacher's student's teacher's student's...,
### a result may not share a common ancestral master with Guo Degang.
#defaultView:Graph
SELECT ?network ?networkLabel ?birthdate ?image ?parent_master ?parent_masterLabel ?edgeLabel
WHERE {
  # define ?network as Guo Degang (Q5619584)'s any father (P22) or mother (P25) or child (P40) or teacher (P1066) or student (P802)'s 
  # father or mother or child or student or teacher's...
  wd:Q5619584 (wdt:P22|wdt:P25|wdt:P40|wdt:P1066|wdt:P802)* ?network
  # optional: define ?network's father (P22) or mother (P25) or teacher (P1066) as ?parent_master
  optional {?network (wdt:P22|wdt:P25|wdt:P1066) ?parent_master
            # To avoid showing any other relation,
            # define ?relation as father (P22) or mother (P25) or teacher (P1066)
            VALUES ?relation {wdt:P22 wdt:P25 wdt:P1066}
            # ?relation is from ?network to ?parent_master
            ?network ?relation ?parent_master.
            # get ?relation's property label and allow it to appear on graph edge
            ?edge wikibase:directClaim ?relation;
               a wikibase:Property}
  # optional: show ?network's birthdate (P569), which only appears in table, not graph
  optional {?network wdt:P569 ?birthdate}
  # optional: show ?network's image (P18), which appears directly in graph, and as link in table
  optional {?network wdt:P18 ?image}
  # show label in auto language as default, and English when no default label exists
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?birthdate"):::projected v4("?edge") v6("?image"):::projected v1("?network"):::projected v2("?parent_master"):::projected v3("?relation") c9(["wikibase:Property"]):::iri c1(["wd:Q5619584"]):::iri c13(["bd:serviceParam"]):::iri c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal 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; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P802"--> v1 end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P1066"--> v1 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P40"--> v1 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P25"--> v1 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P22"--> v1 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; subgraph union5[" Union "] subgraph union5l[" "] style union5l fill:#abf,stroke-dasharray: 3 3; v1 -."wdt:P1066".-> v2 end subgraph union5r[" "] style union5r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P25"--> v2 end union5r <== or ==> union5l end end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P22"--> v2 end union4r <== or ==> union4l end bind0[/VALUES ?relation/] bind0-->v3 bind00(["wdt:P22"]) bind00 --> bind0 bind01(["wdt:P25"]) bind01 --> bind0 bind02(["wdt:P1066"]) bind02 --> bind0 v1 -->v3--> v2 v4 --"wikibase:directClaim"--> v3 v4 --"a"--> c9 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; c13 --"wikibase:language"--> c15 end