what is the {postal code} for {United States Naval Academy} has {headquarters location} as {Annapolis} ?
What is the zip code for the US Naval Academy headquartered in Annapolis?
What is the postal code of United States Naval Academy which has its headquarters in Annapolis?
SELECT ?i WHERE { ?z property:headquarters_location resource:Annapolis . ?z property:postal_code ?i . resource:United_States_Naval_Academy property:headquarters_location ?z }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q559549> .
?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/Q28271> .
?statement <http://www.wikidata.org/entity/P281> ?value. 
} 

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