which wines are red wine-colored?
Entity Entity Entity Entity
m.02wsb19 m.01224x m.0fqm_ m.02z2t
Still Wine Sparkling wine Dessert wine Fortified wine
class class entity
wine.wine_type wine.wine m.02wsb20
wine.wine_type wine.wine wine.wine_color
Wine Type Wine Red Wine
none none none
wine.wine_type.wines wine.wine_color.wines
Wines Wines
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.wine_type . 
?x1 :type.object.type :wine.wine . 
VALUES ?x2 { :m.02wsb20 } 
?x0 :wine.wine_type.wines ?x1 . 
?x2 :wine.wine_color.wines ?x1 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND wine.wine_type (JOIN wine.wine_type.wines (JOIN (R wine.wine_color.wines) m.02wsb20)))