what is the {academic major} for {Leopold von Ranke} has {educated at} as {Leipzig University} ?
Leopold von Ranke's major at Leipzig University?
What was Leopold von Ranke's major at Leipzig University?
SELECT ?p WHERE { ?g property:educated_at resource:Leipzig_University . resource:Leopold_von_Ranke property:educated_at ?g . ?g property:academic_major ?p }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q77184> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P69> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q154804> .
?statement <http://www.wikidata.org/entity/P812> ?value. 
} 

SELECT ?value WHERE { wd:Q77184 p:P69 ?s . ?s ps:P69 wd:Q154804 . ?s pq:P812 ?value}