What is the {municipality of Germany} for {shares border with} of {Hamburg}
What city in Germany borders Hammburg?
What city in Germany borders Hammburg?
SELECT DISTINCT ?q WHERE { ?q rdf:type ontology:municipality_of_Germany . resource:Hamburg property:shares_border_with ?q }
select distinct ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1055> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P47> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj . ?obj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q262166> } 
 select distinct ?obj where { wd:Q1055 wdt:P47 ?obj . ?obj wdt:P31 wd:Q262166 } 
Halstenbek Bönningstedt Seevetal