the martial artist whose favorite film is the treasure of the sierra madre is whom?
Entity
m.01xrvjm
Niall O'Higgins
class class entity
martial_arts.martial_artist freebase.user_profile m.02q_ncg
martial_arts.martial_artist freebase.user_profile film.film
Martial Artist User Profile The Treasure of the Sierra Madre
none none none
freebase.user_profile.person freebase.user_profile.favorite_films
Person-Topic About Me Favorite Films
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 :martial_arts.martial_artist . 
?x1 :type.object.type :freebase.user_profile . 
VALUES ?x2 { :m.02q_ncg } 
?x1 :freebase.user_profile.person ?x0 . 
?x1 :freebase.user_profile.favorite_films ?x2 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND martial_arts.martial_artist (JOIN (R freebase.user_profile.person) (JOIN freebase.user_profile.favorite_films m.02q_ncg)))