What is {twinned administrative body} of {Makhachkala} that is {end time} is {2016-2-11} ?
Name  Makhachkala's twinned administrative body before Feb 2nd, 2016.
Who was the twinned administrative body of Makhachkala until February 2nd 2016?
SELECT ?k WHERE { ?k property:end_time ?j . resource:Makhachkala property:twinned_administrative_body ?k . ?k property:twinned_administrative_body ?k . FILTER ( CONTAINS ( YEAR ( ?j ) , '2016' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q5168> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P190> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <2016-2-11>
} 

SELECT ?obj WHERE { wd:Q5168 p:P190 ?s . ?s ps:P190 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'2016')) }