What is {noble title} of {Gediminas} that is {end time} is {1341-1-1} ?
Gediminas held what title in 1341?
what title did Gediminas hold in 1341-1-1?
SELECT ?t WHERE { resource:Gediminas property:noble_title ?b . ?b property:noble_title ?t . FILTER ( CONTAINS ( YEAR ( ?o ) , '1341' ) ) . ?b property:end_time ?o }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q244852> .
?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> <1341-1-1>
} 

SELECT ?obj WHERE { wd:Q244852 p:P97 ?s . ?s ps:P97 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1341')) }