What is {tracklist} of {Pet Sounds} that is {series ordinal} is {B5} ?
which as a tracklist of Pet Sounds that has series ordinal is B5?
What is tracklist of Pet Sounds that has series ordinal is B5?
SELECT ?k WHERE { resource:Pet_Sounds property:tracklist ?h . FILTER ( CONTAINS ( ?y , 'B5' ) ) . ?h property:tracklist ?k . ?h property:series_ordinal ?y }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q212863> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P658> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P1545> <B5>
} 

SELECT ?obj WHERE { wd:Q212863 p:P658 ?s . ?s ps:P658 ?obj . ?s pq:P1545 ?x filter(contains(?x , 'B5')) }