which fruit is used to make red wine?
Entity Entity Entity
m.02ws9z7 m.02ws9_1 m.02ws9zd
Producer owned Purchased Grapes Purchased Juice
class class entity
wine.fruit_source wine.wine m.02wsb20
wine.fruit_source wine.wine wine.wine_color
Fruit Source Wine Red Wine
none none none
wine.fruit_source.wines wine.wine.color
Wines Color
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 :wine.fruit_source . 
?x1 :type.object.type :wine.wine . 
VALUES ?x2 { :m.02wsb20 } 
?x0 :wine.fruit_source.wines ?x1 . 
?x1 :wine.wine.color ?x2 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND wine.fruit_source (JOIN wine.fruit_source.wines (JOIN wine.wine.color m.02wsb20)))