What is {instance of} of {Columbia} that is {capital of} is {South Carolina} ?
what is the capital of south carolina?
Is Columbia the capital city of South Carolina?
SELECT ?i WHERE { ?r property:capital_of resource:South_Carolina . ?r rdf:type ?i . resource:Columbia rdf:type ?r }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q38453> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P31> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P1376> <http://wikidata.dbpedia.org/resource/Q1456>
} 

SELECT ?obj WHERE { wd:Q38453 p:P31 ?s . ?s ps:P31 ?obj . ?s pq:P1376 wd:Q1456 }