what is the {end time} for {Federal Republic of Central America} has {capital} as {Sonsonate} ?
When did the Capital of Sonsonate for the Federal Republic of Central America end?
Tell me the end time for Federal Republic of Central America has capital as Sonsonate ?
SELECT ?b WHERE { ?i property:capital resource:Sonsonate . resource:Federal_Republic_of_Central_America property:capital ?i . ?i property:end_time ?b }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q190025> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P36> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q1014248> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q190025 p:P36 ?s . ?s ps:P36 wd:Q1014248 . ?s pq:P582 ?value}