What is {has moon} of {parent body} of {Messier 7} ?
Name the moon of the parent body in Messier 7.
What is the moon of the parent body in Messier 7?
SELECT ?n WHERE { ?t property:child_astronomical_body ?n . resource:Messier_7 property:parent_astronomical_body ?t }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q11234> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P397>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?X . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?X. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P398> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . }
SELECT ?answer WHERE { wd:Q11234 wdt:P397 ?X . ?X wdt:P398 ?answer}