What is {capital of} of {Türkmenabat} that is {end time} is {1930-0-0} ?
What was the capital of Türkmenabat in 1930
In 1930, what was the capital of Türkmenabat?
SELECT ?e WHERE { ?n property:capital_of ?e . ?n property:end_time ?z . resource:Türkmenabat property:capital_of ?n . FILTER ( CONTAINS ( YEAR ( ?z ) , '1930' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q487684> .
?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> <1930-0-0>
} 

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