what is the {start time} for {Cuba} has {member of} as {United Nations} ?
The year Cuba joined the UN
When did Cuba become a member of the UN?
SELECT ?i WHERE { ?d property:member_of resource:United_Nations . resource:Cuba property:member_of ?d . ?d property:start_time ?i }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q241> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P463> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q1065> .
?statement <http://www.wikidata.org/entity/P580> ?value. 
} 

SELECT ?value WHERE { wd:Q241 p:P463 ?s . ?s ps:P463 wd:Q1065 . ?s pq:P580 ?value}