Question: When was Charles VI, Holy Roman Emperor, the King of Hungary?
SPARQL (Wikidata): SELECT ?value WHERE { wd:Q150665 p:P39 ?s . ?s ps:P39 wd:Q6412254 . ?s pq:P580 ?value}