What is {country} of {Prague} that is {start time} is {895-0-0} ?
In 895 AD, Prague was a part of which country?
What country did Prague belong to in 895 AD?
SELECT ?p WHERE { ?u property:start_time ?d . ?u property:country ?p . resource:Prague property:country ?u . FILTER ( CONTAINS ( ?d , '895-0-0' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1085> .
?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> ?obj .
?statement <http://www.wikidata.org/entity/P580> <895-0-0>
} 

SELECT ?obj WHERE { wd:Q1085 p:P17 ?s . ?s ps:P17 ?obj . ?s pq:P580 ?x filter(contains(?x , '895-0-0')) }