what is the {start time} for {Marrakesh} has {country} as {Morocco} ?
On what date was Marrakesh incorporated into Morocco?
When did Marrakesh become a city in Morocco?
SELECT ?e WHERE { ?h property:country resource:Morocco . ?h property:start_time ?e . resource:Marrakesh property:country ?h }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q101625> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P17> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q1028> .
?statement <http://www.wikidata.org/entity/P580> ?value. 
} 

SELECT ?value WHERE { wd:Q101625 p:P17 ?s . ?s ps:P17 wd:Q1028 . ?s pq:P580 ?value}