what is the {start time} for {Shanghai} has {twinned administrative body} as {Istanbul} ?
What is the date that Shanghai and Istanbul were twinned?
When was Shanghai twinned with Istanbul?
SELECT ?p WHERE { ?q property:twinned_administrative_body resource:Istanbul . resource:Shanghai property:twinned_administrative_body ?q . ?q property:start_time ?p }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q8686> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P190> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q406> .
?statement <http://www.wikidata.org/entity/P580> ?value. 
} 

SELECT ?value WHERE { wd:Q8686 p:P190 ?s . ?s ps:P190 wd:Q406 . ?s pq:P580 ?value}