Like many people before me I'd have to say Sherlock Holmes. However I'm tied between either the original book Holmes and Steven Moffats adaptation of Sherlock.
I'll say it again, Scooby is no detective. Fred and Velma are usually the ones who piece the case together; Shag and Scoob are just there for comic relief, and Daphne is there so they have someone to fall into traps and get captured. The only time any of those three characters ever do anything useful or helpful to the case is when they do it entirely on accident. Not much constructive thought goes on in any of their minds, especially Scooby's.
I hate to say it, but even Scrappy Doo is a better detective than his uncle Scooby.