What is the {historical Chinese state} for {capital} of {Nanjing}
What is the capital of Nanjing?
What is the capital of Nanjing?
SELECT DISTINCT ?x WHERE { ?x property:capital resource:Nanjing . ?x rdf:type ontology:historical_Chinese_state }
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/P36> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q16666> . ?subj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q50068795> } 
 select distinct ?sbj where { ?sbj wdt:P36 wd:Q16666 . ?sbj wdt:P31 wd:Q50068795 } 
Eastern Wu Liang dynasty Southern Ming Dynasty Wu guo Southern Tang