I've been grading, grading, grading recently, and in the course of doing it I have watched three classic mystery comedies: A Shot in the Dark (1964), Murder by Death (1976), and Clue (1985), each of which is at least a reasonable candidate for being the best mystery comedy of its decade. I thought I might say a few things about each one, in light of having watched all three in close succession.
Of the three, A Shot in the Dark is arguably the one that works best as a comedy, and it is easy enough to see why. Peter Sellers plays Inspector Clouseau, his best and most popular comic character, in the middle of an excellent cast including Burt Kwouk (Kato/Cato), Herbert Lom (Inspector Dreyfus), Elke Sommer (Maria Gambrelli), and Graham Stark (Hercule LaJoy), all in their top game. The movie is unusually rich as a comedy, being an originally independent comic script that was merged with Inspector Clouseau (because that was the condition for getting Peter Sellers in the movie) and is filled with improvisation (perhaps the best example of which is the watch synchronization theme, which was almost entirely improvised by Sellers and Stark). There are very obvious jokes, but there are also very subtle ones, and almost every character gets a genuine comic moment. As a mystery it is organized by the idea that all the evidence points to a particular suspect; but Inspector Clouseau is in love with her and therefore keeps investigating well beyond the point that anybody else would have taken her guilt to be obvious. We aren't really trying to figure how the crime happened; we're trying to figure out how Inspector Clouseau will wrap it up. The mystery is just a vehicle for the comedy. And, notably, the mystery itself is never treated as a joke.
Murder by Death, on the other hand, is entirely about mystery, since it is nothing other than a spoofing of the genre. It is easily the one that has the most all-star cast (which is extraordinary, when you consider the casts of the other two): Truman Capote (Lionel Twain), Alec Guinness (Jamesir Bensonmum, the blind butler), Peter Sellers (Sidney Wang), Richard Narita (Willie Wang), David Niven (Dick Charleston), Maggie Smith (Dora Charleston), James Coco (Milo Perrier), James Cromwell (Marcel Cassette, his very first movie role), Peter Falk (Sam Diamond), Eileen Brennan (Tess Skeffington), Elsa Lanchester (Jessica Marbles), Estelle Winwood (Miss Withers, her last movie role at the age of 92), Nancy Walker (Yetta, the deaf-mute cook, also her last movie role). The screaming doorbell is no less than Fay Wray's screams from King Kong and the art of the opening was drawn by Charles Addams. The villain/victim of the piece, Lionel Twain, has invited several world-famous detectives to dinner and a murder: Sidney Wang (a spoof of Earl Derr Biggers's Charlie Chan), Sam Diamond (a spoof of Dashiell Hammett's Sam Spade), Dick and Dora Charleston (a spoof of Hammett's Nick and Nora Charles), Milo Perrier (a spoof of Agatha Christie's Hercule Poirot), and Jessica Marbles (a spoof of Christie's Jane Marple). Each of the detectives does things and makes deductions that are simply impossible -- perhaps the best is Wang's unexplained detection of the colorless, odorless, tasteless poison in the food -- and the mystery undergoes increasingly improbable and ludicrous twists and endless red herring trails. There are constant in-jokes for anyone who has read a lot of Dashiell Hammett and Agatha Christie. For all that, the movie actually avoids doing any of the bad-mystery-plot things it satirizes when it comes to its own mystery plot: every major element of the solution is set up in the story leading up to it -- you'll just never see the set-up except in hindsight because there are so many other things happening.
The humor is often a bit coarse, and the jokes a bit thick. Peter Sellers actually thought it was going to flop badly, so insisted on buying back his share in the profits -- which turned out to be a mistake, because it actually became a hit and cult classic.
Of the three, Clue is the most fun as a movie, and the one that most tries to give the feel of a real mystery despite being a comedy (although it makes much less of an effort to be consistent than Murder by Death does). In some ways it is weakest as a comedy, being almost all screwball and slapstick, although it still manages to be funny. It too has an excellent cast: Tim Curry (Wadsworth the butler), Eileen Brennan (Mrs. Peacock), Madeline Kahn (Mrs. White), Christopher Lloyd (Professor Plum), Michael McKean (Mr. Green), Martin Mull (Colonel Mustard), Lesley Ann Warren (Miss Scarlet), and Colleen Camp (Yvette the maid). The movie succeeds mostly by everyone making a real contribution to the zaniness. It also makes neat use of multiple possible endings: when it was originally shown in theaters, the movie was shown with one of three different endings, all of which began to be shown sequentially for TV and video. All three of the endings cheat, however, by changing details or remembering things that never happened, making the movie's plot exactly the kind of story mocked in Murder by Death. But, interestingly, I think that Clue ends up being a funnier movie overall than Murder by Death, despite the fact that the latter is in many ways technically superior.
Of the three, A Shot in the Dark is the only one that gives a story contemporaneous with its original audience, Murder by Death gives (apparently deliberately) very inconsistent signals as to what time it takes place in, and Clue sets itself thirty years in the past. Clue is the only one that places itself on a specific date: June 9, 1954. (All the McCarthy and Communism references in the film converge on this date, although it only explicitly states that it occurs in 1954.) A Shot in the Dark is the only one that gives itself a specific city (Paris); given its geographical hints, Clue has to take place somewhere in Connecticut or Massachusetts, although it never explicitly tells us more than that it occurs in New England. Murder by Death was the most financially successful in theaters; Clue performed very weakly at the box office, only becoming popular when it hit TV.
Seeing all three together brings out different features of each. There are, of course, the two overlaps in casting (Peter Sellers in A Shot in the Dark and Murder by Death, and Eileen Brennan in Murder by Death and Clue, although in both cases the characters are very different). Both A Shot in the Dark and Clue have an occasionally similar feel on the comedy side, since they both make extensive use of physical comedy, of which Murder by Death has relatively little. But Murder by Death and Clue have a large number of structural similarities: they both are whodunits involving a number of people drawn to a mansion by mysterious invitations; in both a murder happens and it has to be solved on the premises; both are much more ensemble-cast in their feel and rely heavily on character humor; and they both compensate for the ensemble structure by pairing characters off.
One of the things that was very noticeable was the sexual humor; all three have a lot of it. The movie with the most sexual humor, surprisingly, is Clue, in which it is almost nonstop. I say 'surprisingly' because you could easily miss it: Clue has many more sex jokes than the other two, but both of the other movies go much farther with their sexual humor -- Clue is constantly cracking wise about sex, but it always raises the joke only to drop it and move on to something else. Both A Shot in the Dark and Murder by Death, on the other hand, draw out their sexual humor extensively and call attention to it. But, of course, in many ways all three are relatively tame compared to fare served today.