What is {head of government} of {Tocantins} that is {end time} is {2018-3-22} ?
Give me the name of the ruler whose reign over the Tocanis government ended on 3/22/20187.
Who's rule over Tocanis government ended on 3-22-20187?
SELECT ?d WHERE { ?q property:end_time ?u . ?q property:head_of_government ?d . resource:Tocantins property:head_of_government ?q . FILTER ( CONTAINS ( YEAR ( ?u ) , '2018' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q43695> .
?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> <2018-3-22>
} 

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