This is the story of what actually happened. It typically ends before the book begins and remains "absent" until the very end.
“The whodunit contains two stories: the story of the crime and the story of the investigation. The thriller contains only one.” tzvetan todorov the typology of detective fiction
In the whodunit, there is a strict hierarchy. The detective’s actions are merely a tool to reconstruct the past. Suspense is minimal because the detective is never in real danger. The detective is a genius (Holmes, Poirot) who operates outside the emotional turmoil of the crime. This is the story of what actually happened