What is {noble title} of {Louis the Pious} that is {end time} is {814-0-0} ?
Louis the Pious possessed what noble title in 814?
What noble title did Louis the Pious have in year 814?
SELECT ?a WHERE { resource:Louis_the_Pious property:noble_title ?b . ?b property:end_time ?k . ?b property:noble_title ?a . FILTER ( CONTAINS ( ?k , '814-0-0' ) ) }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q43974> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P97> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <814-0-0>
} 

SELECT ?obj WHERE { wd:Q43974 p:P97 ?s . ?s ps:P97 ?obj . ?s pq:P582 ?x filter(contains(?x , '814-0-0')) }