What is {mayor} of {Karlsruhe}, that has {birthdate} is {1700-1-1} ?
Who is Karlsruhe's mayor, who was born on January 1, 1700?
Who is the mayor of Karlsruhe, that was born on January 1, 1700?
SELECT ?p WHERE { resource:Karlsruhe property:head_of_government ?p . FILTER ( CONTAINS ( YEAR ( ?t ) , '1700' ) ) . ?p property:date_of_birth ?t }
SELECT ?answer WHERE { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1040> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P6>. ?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/P569> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <1700-1-1> . }
SELECT ?answer WHERE { wd:Q1040 wdt:P6 ?answer . ?answer wdt:P569 ?x FILTER(contains(YEAR(?x),'1700'))}