Question: Of the countries which are members of the Security Council, which has the country capital of San JosÃ©?
Answer(s):
answer: Costa Rica

SPARQL query:
PREFIX ns: <http://rdf.freebase.com/ns/>
SELECT DISTINCT ?x
WHERE {
FILTER (?x != ns:m.07vnr)
FILTER (!isLiteral(?x) OR lang(?x) = '' OR langMatches(lang(?x), 'en'))
ns:m.07vnr ns:base.unitednations.united_nations_body.members ?y .
?y ns:base.unitednations.united_nations_body_membership.member ?x .
FILTER(NOT EXISTS {?y ns:base.unitednations.united_nations_body_membership.from ?sk0} || 
EXISTS {?y ns:base.unitednations.united_nations_body_membership.from ?sk1 . 
FILTER(xsd:datetime(?sk1) <= "2015-08-10"^^xsd:dateTime) })
FILTER(NOT EXISTS {?y ns:base.unitednations.united_nations_body_membership.to ?sk2} || 
EXISTS {?y ns:base.unitednations.united_nations_body_membership.to ?sk3 . 
FILTER(xsd:datetime(?sk3) >= "2015-08-10"^^xsd:dateTime) })
?x ns:location.country.capital ns:m.01g3b2 . 
}