What is {work location} of {John Ruskin} and {end time}
What function did James Matheson keep and when did it start?
Where did John Ruskin work and when did his work end?
SELECT ?f ?x WHERE { resource:John_Ruskin property:work_location ?d . ?d property:work_location ?x . ?d property:end_time ?f . }
select distinct ?dataprop1 ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q179126> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P937> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj . ?statement <http://www.wikidata.org/entity/P580> ?dataprop1 . } 
SELECT ?value1 ?obj WHERE { wd:Q179126 p:P937 ?s . ?s ps:P937 ?obj . ?s pq:P582 ?value1 . }