what ingredient contains condiment and is compatible with a vegans?
Entity Entity
m.0ht80 m.01lzzr
Ketchup Sambal
class entity entity
food.ingredient m.0gtdm m.07_hy
food.ingredient food.ingredient food.dietary_restriction
Ingredient Condiment vegans
none none none
food.ingredient.more_specific_ingredient food.ingredient.compatible_with_dietary_restrictions
More specific ingredient Compatible with dietary restrictions
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 :food.ingredient . 
VALUES ?x1 { :m.0gtdm } 
VALUES ?x2 { :m.07_hy } 
?x1 :food.ingredient.more_specific_ingredient ?x0 . 
?x0 :food.ingredient.compatible_with_dietary_restrictions ?x2 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND food.ingredient (AND (JOIN (R food.ingredient.more_specific_ingredient) m.0gtdm) (JOIN food.ingredient.compatible_with_dietary_restrictions m.07_hy)))