What is {head of government} of {Tampere} that is {start time} is {2017-0-0} ?
Who won the presidential election in Tampere in 2017?
Who was elected the president of Tampere in 2017?
SELECT ?t WHERE { ?b property:start_time ?j . ?b property:head_of_government ?t . FILTER ( CONTAINS ( YEAR ( ?j ) , '2017' ) ) . resource:Tampere property:head_of_government ?b }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q40840> .
?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/P580> <2017-0-0>
} 

SELECT ?obj WHERE { wd:Q40840 p:P6 ?s . ?s ps:P6 ?obj . ?s pq:P580 ?x filter(contains(YEAR(?x),'2017')) }