Question: Who did Joseph Buonaparte replace as King of Spain?
Paraphrase: Who was King of spain before Joseph Buonaparte?
SPARQL (Wikidata): SELECT ?value WHERE { wd:Q7726 p:P39 ?s . ?s ps:P39 wd:Q3847454 . ?s pq:P1366 ?value}