What is {twin city} of {San Francisco}, that has {has districts} is {Songjiang District} ?
What is San Francisco's twin city containing the district Songjiang?
Which twin city of San Francisco has the district Songjiang?
SELECT ?e WHERE { ?e property:contains_administrative_territorial_entity resource:Songjiang_District . resource:San_Francisco property:twinned_administrative_body ?e }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q62> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P190>. ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?answer . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?answer. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P150> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q662380> . }
SELECT ?answer WHERE { wd:Q62 wdt:P190 ?answer . ?answer wdt:P150 wd:Q662380}
Shanghai