What is {given name} of {Ewan McGregor} that is {series ordinal} is {2} ?
What series was Ewan McGregor in that had a series ordinal of 2?
Which series was Ewan McGregor in that has a series ordinal of 2?
SELECT ?g WHERE { ?n property:given_name ?g . ?n property:series_ordinal ?v . FILTER ( CONTAINS ( ?v , '2' ) ) . resource:Ewan_McGregor property:given_name ?n }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q165518> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P735> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P1545> <2>
} 

SELECT ?obj WHERE { wd:Q165518 p:P735 ?s . ?s ps:P735 ?obj . ?s pq:P1545 ?x filter(contains(?x , '2')) }