What is {given name} of {Oscar Wilde} that is {series ordinal} is {2} ?
Well, what was the name of the second work published by Oscar Wilde?
What was the name of the second work published by Oscar Wilde?
SELECT ?d WHERE { resource:Oscar_Wilde property:given_name ?l . ?l property:series_ordinal ?q . FILTER ( CONTAINS ( ?q , '2' ) ) . ?l property:given_name ?d }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q30875> .
?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:Q30875 p:P735 ?s . ?s ps:P735 ?obj . ?s pq:P1545 ?x filter(contains(?x , '2')) }