what is the {end time} for {Valentino Rossi} has {member of sports team} as {Ducati Motor Holding} ?
On what date did Valentino Rossi stop competing for Ducati Motor Holding?
When did Valentino Rossi stop competing for Ducati Motor Holding?
SELECT ?x WHERE { resource:Valentino_Rossi property:member_of_sports_team ?c . ?c property:end_time ?x . ?c property:member_of_sports_team resource:Ducati_Motor_Holding_S.p.A. }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q169814> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P54> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q271812> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q169814 p:P54 ?s . ?s ps:P54 wd:Q271812 . ?s pq:P582 ?value}