Question: In what role did David the Second of Scotland, replace Robert the First of Scotland?
SPARQL (Wikidata): SELECT ?obj WHERE { wd:Q187312 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q239486 }