SELECT DISTINCT ?uri WHERE { ?x <http://dbpedia.org/property/doctoralStudents> <http://dbpedia.org/resource/Mary_Ainsworth> . ?x <http://dbpedia.org/property/doctoralStudents> ?uri . ?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Scientist>}
Name all the doctoral student of the scientist who also supervised Mary Ainsworth ?
SELECT DISTINCT ?g WHERE { ?u rdf:type ontology:Scientist . ?u property:doctoral_students ?g . ?u property:doctoral_students resource:Mary_Ainsworth }
Abraham Maslow, Mary Ainsworth, John Bowlby
The doctoral students of the scientist whose on doctoral student was Mary Ainsworth are [Abraham Maslow, Mary Ainsworth, John Bowlby].
The doctoral students of the scientist under whom Mary Ayworth was a doctoral student are [Abraham Maslow, Mary Ayworth, John Boulby].
The doctoral students of the scientists whose doctoral students is her are [her, Abraham Maslow, John Bowlby].
The PhD students with same supervisor as her is are [she, Abraham Maslow, John Boulby].