what is the {start time} for {Calgary} has {located in the administrative territorial entity} as {Alberta} ?
What date was Calgary, Alberta founded?
When was Calgary, Alberta founded?
SELECT ?z WHERE { ?j property:located_in_the_administrative_territorial_entity resource:Alberta . ?j property:start_time ?z . resource:Calgary property:located_in_the_administrative_territorial_entity ?j }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q36312> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P131> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q1951> .
?statement <http://www.wikidata.org/entity/P580> ?value. 
} 

SELECT ?value WHERE { wd:Q36312 p:P131 ?s . ?s ps:P131 wd:Q1951 . ?s pq:P580 ?value}