What is {partner town} of {Toulon}, that has {first recorded in} is {766-0-0} ?
What was the accomplice town of Toulon that was to begin with recorded in 766-0-0?
What was the partner town of Toulon that was first recorded in 766-0-0?
SELECT ?a WHERE { resource:Toulon property:twinned_administrative_body ?a . FILTER ( CONTAINS ( ?m , '766-0-0' ) ) . ?a property:time_of_earliest_written_record ?m }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q44160> . ?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/P1249> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <766-0-0> . }
SELECT ?answer WHERE { wd:Q44160 wdt:P190 ?answer . ?answer wdt:P1249 ?x FILTER(contains(?x , '766-0-0'))}