what is the deity of the religion that has its place of worship in naissa mosque?
Entity Entity Entity
m.0jfd m.0d05l6 m.055v4c
Allah God Ramdev Pir
class class entity
religion.deity religion.religion m.05mz6pc
religion.deity religion.religion religion.place_of_worship
Deity Religion Naissa Mosque
none none none
religion.religion.deities religion.religion.places_of_worship
Deity Or Deities Places of worship (current)
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 :religion.deity . 
?x1 :type.object.type :religion.religion . 
VALUES ?x2 { :m.05mz6pc } 
?x1 :religion.religion.deities ?x0 . 
?x1 :religion.religion.places_of_worship ?x2 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(AND religion.deity (JOIN (R religion.religion.deities) (JOIN religion.religion.places_of_worship m.05mz6pc)))