What is {shares border with} of {Northern Territory} that is {statement is subject of} is {26th parallel south} ?
Which country borders with Northern Territory and runs along the 26th parallel south?
What country shares a border with Northern Territory and is along the 26th parallel south?
SELECT ?a WHERE { ?g property:statement_is_subject_of resource:26th_parallel_south . resource:Northern_Territory property:shares_border_with ?g . ?g property:shares_border_with ?a }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q3235> .
?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/Q1390493>
} 

SELECT ?obj WHERE { wd:Q3235 p:P47 ?s . ?s ps:P47 ?obj . ?s pq:P805 wd:Q1390493 }