query-2243cd5fa7d77a7034f97783e28688bb
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?itemLabel ?description ?image ?legend ?birthdate ?deathdate ?nationality ?sex ?occupation ?sitelink ?article WHERE {
{
SELECT ?item ?itemLabel ?birthdate WHERE {
?item wdt:P31 wd:Q5;
rdfs:label ?itemLabel;
wdt:P569 ?birthdate.
FILTER(("1920-00-00"^^xsd:date <= ?birthdate) && (?birthdate < "1923-00-00"^^xsd:dat))
FILTER((LANG(?itemLabel)) = "en")
} } OPTIONAL { ?item schema:description ?description. FILTER((LANG(?description)) = "en") }
OPTIONAL { ?item wdt:P734 ?lastname. }
OPTIONAL { ?item wdt:P570 ?deathdate. }
OPTIONAL { ?item wdt:P27 ?nationality. }
OPTIONAL { ?item wdt:P21 ?sex. }
OPTIONAL { ?item wdt:P106 ?occupation. }
OPTIONAL {
?item p:P18 ?stat.
?stat ps:P18 ?image.
OPTIONAL { ?stat pq:P2096 ?legend. }
}
OPTIONAL {
?article schema:about ?item;
schema:isPartOf <https://en.wikipedia.org/>;
schema:name ?sitelink.
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v13("?article"):::projected
v3("?birthdate"):::projected
v6("?deathdate"):::projected
v1("?description"):::projected
v11("?image"):::projected
v4("?item"):::projected
v2("?itemLabel"):::projected
v5("?lastname")
v12("?legend"):::projected
v7("?nationality"):::projected
v9("?occupation"):::projected
v8("?sex"):::projected
v14("?sitelink"):::projected
v10("?stat")
c19([https://en.wikipedia.org/]):::iri
c5(["wd:Q5"]):::iri
f0[["?itemLabel = 'en'"]]
f0 --> v2
f1[["'1920-00-00^^xsd:date' <= ?birthdate?birthdate < s1923-00-00^^<http://www.w3.org/2001/XMLSchema#dat>'"]]
f1 --> v3
v4 --"p:direct/P31"--> c5
v4 --"rdfs:label"--> v2
v4 --"p:direct/P569"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:description".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P734".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P570".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P27".-> v7
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P21".-> v8
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P106".-> v9
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:P18".-> v10
v10 --"p:statement/P18"--> v11
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
v10 -."p:qualifier/P2096".-> v12
end
end
subgraph optional8["(optional)"]
style optional8 fill:#bbf,stroke-dasharray: 5 5;
v13 -."schema:about".-> v4
v13 --"schema:isPartOf"--> c19
v13 --"schema:name"--> v14
end