Question: What was the position held by Mahmud of Ghazn after replacing Mohammad Ghaznavi?
Paraphrase: Mahmud of Ghazn held what position, after replacing Nohammad Ghaznavi?
SPARQL (Wikidata): SELECT ?obj WHERE { wd:Q189271 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q32627 }