Question: What country bordering Armenia has the capital of Baku?
Answer(s):
answer: Azerbaijan

SPARQL query:
PREFIX ns: <http://rdf.freebase.com/ns/>
SELECT DISTINCT ?x
WHERE {
FILTER (?x != ns:m.0jgx)
FILTER (!isLiteral(?x) OR lang(?x) = '' OR langMatches(lang(?x), 'en'))
ns:m.0jgx ns:location.location.adjoin_s ?y .
?y ns:location.adjoining_relationship.adjoins ?x .
?x ns:base.biblioness.bibs_location.loc_type ?sk0 .
FILTER (str(?sk0) = "Country")
?x ns:location.country.capital ns:m.01gf5 . 
}