What is the {anatomical structure} for {connects with} of {stomach}
The stomach attachs to which body structure?
Which anatomical structure connects with the stomach?
SELECT DISTINCT ?a WHERE { resource:stomach property:connects_with ?a . ?a rdf:type ontology:anatomical_structure }
select distinct ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1029907> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P2789> . ?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/Q4936952> } 
 select distinct ?obj where { wd:Q1029907 wdt:P2789 ?obj . ?obj wdt:P31 wd:Q4936952 } 