What is {head of government} of {North Sumatra Province} that is {end time} is {2015-0-0} ?
which the head of government  north sumatra province ended in 2015-0-0?
Who was the head of government in North Sumatra Province that ended in 2015-0-0?
SELECT ?d WHERE { ?j property:head_of_government ?d . FILTER ( CONTAINS ( YEAR ( ?n ) , '2015' ) ) . resource:North_Sumatra property:head_of_government ?j . ?j property:end_time ?n }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q2140> .
?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> <2015-0-0>
} 

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