What is {position held} of {Samuel Pepys} that is {series ordinal} is {6} ?
Was was Samuel Pepys sixth position?
What was the sixth position that Samuel Pepys held?
SELECT ?d WHERE { ?c property:position_held ?d . resource:Samuel_Pepys property:position_held ?c . FILTER ( ?d = 6 ) . ?c property:series_ordinal ?d }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q106143> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P1545> <6>
} 

SELECT ?obj WHERE { wd:Q106143 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1545 ?x filter(contains(?x , '6')) }