Hello, I'm happy to answer your question.
Mystery novels with comedy endings are relatively rare, because after all, the plots of mystery novels generally center on murder cases, and they must be solved, so whether the person killed deserves to die or not, The ending is often tragic.
Of course, there are a few exceptions.
For example, in the famous Sherlock Holmes detective series "The Sign of Four", Watson and the reporter get married at the end, which is a comedy ending.
In addition, Carl's "The New Door Bride", "Judas Window", "Till Death Do Us Do Part", etc. all involve one of the lovers getting involved in the case and becoming a suspect. In the end, with the help of the detective, The suspicion was cleared, and the lovers finally got married at the ending.
In the ending of Agatha Christie's "Hellbound", the trapped people are rescued, and in "Murder on the Orient Express", the villains are punished, both of which have comedic endings.
The ending of Shoji Shimada's work "Screwman" also has lovers getting married.
The famous work "When the Cherry Trees Bud, I Miss You" by Gono Akiko also has a Happyending at the end.