what is the {end time} for {Soviet Union} has {member of} as {United Nations Security Council} ?
On what date did the Soviet Union leave the UN Security Council?
When did the Soviet Union leave the United Nations Security Council?
SELECT ?p WHERE { resource:Soviet_Union property:member_of ?j . ?j property:member_of resource:United_Nations_Security_Council . ?j property:end_time ?p }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q15180> .
?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/Q37470> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q15180 p:P463 ?s . ?s ps:P463 wd:Q37470 . ?s pq:P582 ?value}