what is the {end time} for {Hannes Alfvén} has {member of} as {Royal Swedish Academy of Engineering Sciences} ?
Hannes Alfvén ceases to be a member of the Royal Swedish Academy of Engineering Sciences when?
When did Hannes Alfvén cease to be a member of the Royal Swedish Academy of Engineering Sciences?
SELECT ?d WHERE { ?h property:member_of resource:Royal_Swedish_Academy_of_Engineering_Sciences . resource:Hannes_Alfvén property:member_of ?h . ?h property:end_time ?d }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q54945> .
?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/Q3394637> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q54945 p:P463 ?s . ?s ps:P463 wd:Q3394637 . ?s pq:P582 ?value}