query-a3cb64d7648825718b36f527a405b125
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?personLabel ?genderLabel ?dob ?dod
WHERE
{
?item wdt:P31 wd:Q178561 .
optional {?item wdt:P710 ?person . ?person wdt:P31 wd:Q5 .
optional {?person wdt:P21 ?gender.}
optional {?person wdt:P569 ?dob.}
optional {?person wdt:P570 ?dod.}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?person rdfs:label ?personLabel .
?item rdfs:label ?itemLabel .
?gender rdfs:label ?genderLabel .}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?dob"):::projected
v5("?dod"):::projected
v3("?gender")
v8("?genderLabel"):::projected
v1("?item"):::projected
v7("?itemLabel"):::projected
v2("?person")
v6("?personLabel"):::projected
c9(["bd:serviceParam"]):::iri
c2(["wd:Q178561"]):::iri
c4(["wd:Q5"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P31"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P710".-> v2
v2 --"wdt:P31"--> c4
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P21".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P569".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P570".-> v5
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
v2 --"rdfs:label"--> v6
v1 --"rdfs:label"--> v7
v3 --"rdfs:label"--> v8
end