what is the {end time} for {Victoria} has {contains administrative territorial entity} as {Shire of Omeo} ?
When was the Shire of Omeo no longer a part of the Victoria territory?
When did Shire of Omeo stopped being part of the territory of Victoria?
SELECT ?g WHERE { ?q property:end_time ?g . ?q property:contains_administrative_territorial_entity resource:Shire_of_Omeo . resource:Victoria property:contains_administrative_territorial_entity ?q }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q36687> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P150> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q7498472> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q36687 p:P150 ?s . ?s ps:P150 wd:Q7498472 . ?s pq:P582 ?value}