What is {topic of} of {history of Alabama}, that has {has shires} is {Perry County} ?
"Which is {subject of} of {history of Alabama}, that has {has shires} is {Perry Province} ?"
"Which is {topic of} of {history of Alabama}, that has {has shires} is {Perry County} ?"
SELECT ?d WHERE { resource:history_of_Alabama property:facet_of ?d . ?d property:contains_administrative_territorial_entity resource:Perry_County }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q5774933> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1269>. ?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/Q253538> . }
SELECT ?answer WHERE { wd:Q5774933 wdt:P1269 ?answer . ?answer wdt:P150 wd:Q253538}