what is the {statement is subject of} for {Louisiana} has {shares border with} as {Texas} ?
Texas shares its border with what subject of Louisiana?
What statement is subject of Louisiana that shares border with Texas?
SELECT ?h WHERE { resource:Louisiana property:shares_border_with ?n . ?n property:shares_border_with resource:Texas . ?n property:statement_is_subject_of ?h }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1588> .
?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/Q1439> .
?statement <http://www.wikidata.org/entity/P805> ?value. 
} 

SELECT ?value WHERE { wd:Q1588 p:P47 ?s . ?s ps:P47 wd:Q1439 . ?s pq:P805 ?value}