What is {from} of {Yes}, that has {ocean} is {River Thames} ?
"Who is from Yes, having an Ocean in the Thames River?"
"Who is from Yes, and has a Ocean in the River Thames?"
SELECT ?u WHERE { resource:Yes property:location_of_formation ?u . ?u property:located_in_or_next_to_body_of_water resource:River_Thames }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q184386> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P740>. ?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/P206> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q19686> . }
SELECT ?answer WHERE { wd:Q184386 wdt:P740 ?answer . ?answer wdt:P206 wd:Q19686}
London