What is {headquarters location} of {University of Barcelona} that is {postal code} is {08007} ?
Which address for the University of Barcelona has a postal code of 08007?
What is the address for the University of Barcelona with a postal code of 08007?
SELECT ?u WHERE { ?z property:postal_code ?q . resource:University_of_Barcelona property:headquarters_location ?z . FILTER ( ?q = 08007 ) . ?z property:headquarters_location ?u }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q219615> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P159> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P281> <08007>
} 

SELECT ?obj WHERE { wd:Q219615 p:P159 ?s . ?s ps:P159 ?obj . ?s pq:P281 ?x filter(contains(?x , '08007')) }