What is {previous is} of {member of} of {James Prescott Joule} ?
What is the past enrollment of James Prescott Joule?
What is the previous membership of James Prescott Joule?
SELECT ?h WHERE { ?b property:follows ?h . resource:James_Prescott_Joule property:member_of ?b }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q8962> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P463>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?X . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?X. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P155> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . }
SELECT ?answer WHERE { wd:Q8962 wdt:P463 ?X . ?X wdt:P155 ?answer}