What is {capital of} of {Shymkent} that is {end time} is {2018-6-19} ?
What was the title of the capital of Shymkent some time recently 2018-6-19?
What was the name of the capital of Shymkent before 2018-6-19?
SELECT ?d WHERE { FILTER ( CONTAINS ( YEAR ( ?i ) , '2018' ) ) . resource:Shymkent property:capital_of ?b . ?b property:end_time ?i . ?b property:capital_of ?d }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q485496> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1376> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <2018-6-19>
} 

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