What is {head of government} of {Saarbrücken} that is {end time} is {2004-0-0} ?
Give me the name of the head of government of Saarbrücken that was replaced in 2004.
Who was the head of government of Saarbrücken that ended at 2004-0-0?
SELECT ?r WHERE { FILTER ( CONTAINS ( YEAR ( ?i ) , '2004' ) ) . ?i property:head_of_government ?r . resource:Saarbrücken property:head_of_government ?i . ?i property:end_time ?i }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1724> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P6> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <2004-0-0>
} 

SELECT ?obj WHERE { wd:Q1724 p:P6 ?s . ?s ps:P6 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'2004')) }