What is {head of state} of {Montenegro} that is {end time} is {2002-11-25} ?
Give me the name of the Montenegran head of state that stepped down on November 25, 2002.
Which Montenegran head of state stepped down on November 25, 2002.
SELECT ?a WHERE { ?b property:end_time ?k . ?b property:head_of_state ?a . resource:Montenegro property:head_of_state ?b . FILTER ( CONTAINS ( YEAR ( ?k ) , '2002' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q236> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P35> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <2002-11-25>
} 

SELECT ?obj WHERE { wd:Q236 p:P35 ?s . ?s ps:P35 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'2002')) }