which chef majored in english?
Entity Entity
m.0463d m.0d997w
Julia Child Katie Lee
class class entity
dining.chef education.education m.02h40lc
dining.chef education.education education.field_of_study
Chef Education english
none none none
education.education.student education.field_of_study.students_majoring
Student Students majoring in this field
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX : <http://rdf.freebase.com/ns/> 
SELECT (?x0 AS ?value) WHERE {
SELECT DISTINCT ?x0  WHERE { 
?x0 :type.object.type :dining.chef . 
?x1 :type.object.type :education.education . 
VALUES ?x2 { :m.02h40lc } 
?x1 :education.education.student ?x0 . 
?x2 :education.field_of_study.students_majoring ?x1 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND dining.chef (JOIN (R education.education.student) (JOIN (R education.field_of_study.students_majoring) m.02h40lc)))