what is the {end time} for {Urban II} has {position held} as {cardinal-bishop} ?
Provide the point at which Urban II's position as Cardinal/Bishop ended.
When did Urban II's position as Cardinal/Bishop end?
SELECT ?g WHERE { ?j property:position_held resource:cardinal-bishop . resource:Urban_II property:position_held ?j . ?j property:end_time ?g }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q30578> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q1729113> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q30578 p:P39 ?s . ?s ps:P39 wd:Q1729113 . ?s pq:P582 ?value}