what is the {postal code} for {Hamilton} has {headquarters location} as {Hamilton} ?
What is the zipcode of Hamilton's headquarters?
What is Hamilton's headquarters postal code?
SELECT ?a WHERE { ?v property:headquarters_location resource:Hamilton . ?v property:postal_code ?a . resource:Hamilton property:headquarters_location ?v }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q133116> .
?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/Q133116> .
?statement <http://www.wikidata.org/entity/P281> ?value. 
} 

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