What is {has kids} of {teacher of} of {Ali al-Hadi} ?
Who is the educator of the kids of Ali al-Hadi?
Who is the teacher of the kids of Ali al-Hadi?
SELECT ?v WHERE { resource:Ali_al-Hadi property:student ?j . ?j property:child ?v }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q315377> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P802>. ?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/P40> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . }
SELECT ?answer WHERE { wd:Q315377 wdt:P802 ?X . ?X wdt:P40 ?answer}
Muhammad al-Mahdi. Sayyid Ali Akbar