What is the {Chinese dynasty} for {capital of} of {Nanjing}
Which Chinese Line had it's capital at Nanjing?
Which Chinese Dynasty had it's capital at Nanjing?
SELECT DISTINCT ?f WHERE { ?f rdf:type ontology:Chinese_dynasty . resource:Nanjing property:capital_of ?f }
select distinct ?obj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q16666> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1376> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj . ?obj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q12857432> } 
 select distinct ?obj where { wd:Q16666 wdt:P1376 ?obj . ?obj wdt:P31 wd:Q12857432 } 
Eastern Jin dynasty Liang dynasty Southern Song Dynasty Southern Ming Dynasty Liu Song dynasty Chen dynasty Southern Qi