Gesta Danorum, a chronicle of legendary and historical Danish kings, of Saxo Grammaticus contains the story of Hamlet. See Hamlet.
Saxo Grammaticus served as secular clerk or secretary to Absalon, archbishop of Lund and foremost advisor to Valdemar I, or so people also know or think. He authored the first full book.