query-4f914c3d45a94e48029f88a252e7841f
TODO
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#>
SELECT DISTINCT ?ane ?aneLabel ?født ?død
{
VALUES ?start { wd:Q3430228 } # Steen Brahe til Knudstrup
?ane (^wdt:P22| ^wdt:P25 | wdt:P40)* ?start .
# Rekursiv søgning efter far-, mor- eller barn-relationer i opadgående retning.
OPTIONAL { ?ane wdt:P569 ?født . }
OPTIONAL { ?ane 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;
v2("?ane"):::projected
v4("?død"):::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;
v2 --"wdt:P40"--> v1
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P25"--> v2
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P22"--> v2
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