query-167eea24ca4a2424bd572cb925c4b340
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 ?character ?characterLabel ?birth ?death WHERE
{
{
SELECT ?fictiontype WHERE {
?fictiontype wdt:P279* wd:Q95074.
}
} ?character wdt:P31 ?fictiontype.
# Date of birth
{ ?character wdt:P569 ?birth . }
# Date of death
UNION { ?character wdt:P570 ?death }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
} ORDER BY ?birth ?death
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?birth"):::projected
v4("?character"):::projected
v2("?death"):::projected
v3("?fictiontype")
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q95074"]):::iri
v3 --"wdt:P279"--> c2
v4 --"wdt:P31"--> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P570"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P569"--> v1
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end