Question: What God is worshipped the religion that has a notable figure of Ali?
Answer(s):
answer: Ramdev Pir
answer: God
answer: Allah

SPARQL query:
PREFIX ns: <http://rdf.freebase.com/ns/>
SELECT DISTINCT ?x
WHERE {
FILTER (?x != ?c)
FILTER (!isLiteral(?x) OR lang(?x) = '' OR langMatches(lang(?x), 'en'))
?c ns:religion.religion.notable_figures ns:m.024c1p . 
?c ns:religion.religion.deities ?x .
}