what is the {postal code} for {Cardiff University} has {headquarters location} as {Cardiff} ?
What is Cardiff University's postal code?
What is the postal code for Cardiff University, whose headquarters is in Cardiff?
SELECT ?w WHERE { resource:Cardiff_University property:headquarters_location ?d . ?d property:headquarters_location resource:Cardiff . ?d property:postal_code ?w }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1035745> .
?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> <http://wikidata.dbpedia.org/resource/Q10690> .
?statement <http://www.wikidata.org/entity/P281> ?value. 
} 

SELECT ?value WHERE { wd:Q1035745 p:P159 ?s . ?s ps:P159 wd:Q10690 . ?s pq:P281 ?value}