what is the {postal code} for {Baidu} has {headquarters location} as {Beijing} ?
Headquartered at Beijing, what is the postal code of Baidu?
Get  the postal code for Baidu that is headquartered at Beijing?
SELECT ?r WHERE { resource:Baidu property:headquarters_location ?f . ?f property:headquarters_location resource:Beijing . ?f property:postal_code ?r }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q14772> .
?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/Q956> .
?statement <http://www.wikidata.org/entity/P281> ?value. 
} 

SELECT ?value WHERE { wd:Q14772 p:P159 ?s . ?s ps:P159 wd:Q956 . ?s pq:P281 ?value}