What is {position held} of {Hammurabi} that is {replaces} is {Sin-Muballit} ?
Sin-Muballit replaced Hammurabi at what position?
What is the position held by Hammurabi who replaces Sin-Muballit?
SELECT ?u WHERE { resource:Hammurabi property:position_held ?t . ?t property:position_held ?u . ?t property:replaces resource:Sin-Muballit }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q36359> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P1365> <http://wikidata.dbpedia.org/resource/Q374546>
} 

SELECT ?obj WHERE { wd:Q36359 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1365 wd:Q374546 }