What is {eponym} of {Visegrád Group}, that has {bordered by} is {Dömös} ?
"What is the eponym of Visegrád Group, whose border by way of is Dömös?"
"What is the eponym of Visegrád Group, whose border by is Dömös?"
SELECT ?h WHERE { ?h property:shares_border_with resource:Dömös . resource:Visegrád_Group property:named_after ?h }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q244323> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P138>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?answer. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P47> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q946405> . }
SELECT ?answer WHERE { wd:Q244323 wdt:P138 ?answer . ?answer wdt:P47 wd:Q946405}