What is the {borough of New York City} for {shares border with} of {Manhattan}
What are the other NYC boroughs that are just next to Manhattan?
Which boroughs in New York City share a border with Manhattan?
SELECT DISTINCT ?s WHERE { ?s rdf:type ontology:borough_of_New_York_City . resource:Manhattan property:shares_border_with ?s }
select distinct ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q11299> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P47> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj . ?obj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q408804> } 
 select distinct ?obj where { wd:Q11299 wdt:P47 ?obj . ?obj wdt:P31 wd:Q408804 } 
Brooklyn The Bronx Queens Staten Island