query-17e8e3b6a5f1fd06eb7605172fadd7e5
Historical regions for building lists of people/places located in historical regions. Llywelyn2000, I added an approach I suggested to Wikidata:WikiProject Historical Place#Historical regionsAt
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 ?item ?itemLabel ?yob ?yod
WHERE
{
?item wdt:P19 ?pob .
?pob wdt:P131* ?parts .
wd:Q104285 wdt:P527 ?parts .
OPTIONAL { ?item wdt:P569 ?dob . BIND(YEAR(?dob) as ?yob) }
OPTIONAL { ?item wdt:P570 ?dod . BIND(YEAR(?dod) as ?yod) }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
LIMIT 2000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?dob")
v6("?dod")
v1("?item"):::projected
v3("?parts")
v2("?pob")
v5("?yob"):::projected
v7("?yod"):::projected
c8(["bd:serviceParam"]):::iri
c3(["wd:Q104285"]):::iri
c10(["en"]):::literal
v1 --"wdt:P19"--> v2
v2 --"wdt:P131"--> v3
c3 --"wdt:P527"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P569".-> v4
bind0[/"year-from-dateTime(?dob)"/]
v4 --o bind0
bind0 --as--o v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P570".-> v6
bind1[/"year-from-dateTime(?dod)"/]
v6 --o bind1
bind1 --as--o v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end