What is {capital of} of {Brescia} that is {end time} is {1859-0-0} ?
Tell me the capital of Brescia in 1859.
What was the capital of Brescia in 1859?
SELECT ?v WHERE { FILTER ( CONTAINS ( YEAR ( ?x ) , '1859' ) ) . ?u property:capital_of ?v . ?u property:end_time ?x . resource:Brescia property:capital_of ?u }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q6221> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1376> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1859-0-0>
} 

SELECT ?obj WHERE { wd:Q6221 p:P1376 ?s . ?s ps:P1376 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1859')) }