query-6c4550508d4e9b5a8ecbd251fa64790f

rq turtle/ttl

TODO

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 ?efterkommer ?efterkommerLabel ?født ?død
{
  VALUES ?start { wd:Q3430228 } # Steen Brahe til Knudstrup
  ?efterkommer (wdt:P22| wdt:P25  | ^wdt:P40)* ?start .
  # Rekursiv søgning efter far-, mor- eller barn-relationer i nedadgående retning.
  OPTIONAL { ?efterkommer wdt:P569 ?født . }
  OPTIONAL { ?efterkommer wdt:P570 ?død . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en,de,sv". } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?død"):::projected v2("?efterkommer"):::projected v3("?født"):::projected v1("?start") c7(["bd:serviceParam"]):::iri c9(["da,en,de,sv"]):::literal bind0[/VALUES ?start/] bind0-->v1 bind00(["wd:Q3430228"]) bind00 --> bind0 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; v1 --"wdt:P40"--> v2 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P25"--> v1 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P22"--> v1 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P569".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P570".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end