What is the {ceremonial county of England} for {shares border with} of {Hampshire}
What district in Britain offers a border with Hampshire?
What county in England shares a border with Hampshire?
SELECT DISTINCT ?q WHERE { ?q rdf:type ontology:ceremonial_county_of_England . ?q property:shares_border_with resource:Hampshire }
select distinct ?subj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?subj . ?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> <http://wikidata.dbpedia.org/resource/Q23204> . ?subj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q180673> } 
 select distinct ?sbj where { ?sbj wdt:P47 wd:Q23204 . ?sbj wdt:P31 wd:Q180673 } 
Isle of Wight Dorset Wiltshire Berkshire Surrey West Sussex