what is the {located in the administrative territorial entity} for {Johann Gottfried Herder} has {place of birth} as {Morąg} ?
Johann Gottfried Herder was born where?
Where is the birthplace of Johann Gottfried Herder?
SELECT ?h WHERE { resource:Johann_Gottfried_Herder property:place_of_birth ?z . ?z property:located_in_the_administrative_territorial_entity ?h . ?z property:place_of_birth resource:Morąg }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q155547> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P19> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q139725> .
?statement <http://www.wikidata.org/entity/P131> ?value. 
} 

SELECT ?value WHERE { wd:Q155547 p:P19 ?s . ?s ps:P19 wd:Q139725 . ?s pq:P131 ?value}