What is {replaces} of {Ontario} that is {point in time} is {1889-8-12} ?
Which thing was given to Ontario in 1889?
What was given to Ontario on 1889-8-12?
SELECT ?p WHERE { ?y property:replaces ?p . resource:Ontario property:replaces ?y . FILTER ( CONTAINS ( YEAR ( ?s ) , '1889' ) ) . ?y property:point_in_time ?s }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1904> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1365> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P585> <1889-8-12>
} 

SELECT ?obj WHERE { wd:Q1904 p:P1365 ?s . ?s ps:P1365 ?obj . ?s pq:P585 ?x filter(contains(YEAR(?x),'1889')) }