What is {shares border with} of {Croatia} that is {statement is subject of} is {Croatia–Hungary border} ?
CROATIA IN HUNGARY
What border in Croatia subject of sharing between Croatia-Hungary?
SELECT ?t WHERE { ?i property:statement_is_subject_of resource:Croatia–Hungary_border . ?i property:shares_border_with ?t . resource:Croatia property:shares_border_with ?i }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q224> .
?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 .
?statement <http://www.wikidata.org/entity/P805> <http://wikidata.dbpedia.org/resource/Q3088885>
} 

SELECT ?obj WHERE { wd:Q224 p:P47 ?s . ?s ps:P47 ?obj . ?s pq:P805 wd:Q3088885 }