query-e8b21bc510b728d2a151f98d8fbd6e5e
Adding State to Cities of female persons died before 2000Im am trying to create a list of german females, who died before 2000. The output should also include the city of birth/death and the State (e.g. Hesse) in which the respective city lies. Currently I have not found a solution to this, without timing out. Here my basis query:
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?berufeLabel ?geboren ?geb_ortLabel ?gestorben ?sterbeortLabel ?sitelink
WHERE {
?item wdt:P31 wd:Q5 . #ist Mensch
?item wdt:P21 wd:Q6581072 . #ist weiblich
#?item wdt:P21 ?geschlecht .
?item wdt:P106 ?berufe .
?item wdt:P27 wd:Q183 . #Deutsche
#?item wdt:P27 ?land .
{ ?sitelink schema:about ?item . ?sitelink schema:inLanguage "de" } .
optional {
?item wdt:P569 ?geboren .
?item wdt:P570 ?gestorben .
?item wdt:P19 ?geb_ort .
?item wdt:P20 ?sterbeort .
}
FILTER(YEAR(?gestorben) < 2000).
SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
}
LIMIT 20000