what is the {end time} for {Edred of England} has {country of citizenship} as {Kingdom of Wessex} ?
When did Edred of England end the Kingdom of Wessex?
In what year did Edred of England end the Kingdom of Wessex?
SELECT ?q WHERE { ?b property:country_of_citizenship resource:Wessex . resource:Edred_of_England property:country_of_citizenship ?b . ?b property:end_time ?q }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q191767> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P27> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q105313> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q191767 p:P27 ?s . ?s ps:P27 wd:Q105313 . ?s pq:P582 ?value}