I don't have much reference to provide here. Most books I read are total bummers.
I have read two funny books ever. First one is The Hitchhikers Guide to the Galaxy whose humour I appreciated. The second one is Good Soldier Svejk which I thought was alright.
Any thoughts? Thank you.
Another vote for Pratchett. The Sam Vimes books are essentially crime thrillers, Rincewind books like Colour of Magic are a whistlestop tour of high fantasy tropes, the Witches series explores various ideas of feminism and storytelling, and then Susan Sto Helit and Moist Von Lipwig are used to examine various real world events, such the postal system or invention of the printing press. Equal Rites, Mort, Guards! Guards!, or Monstrous Regiment would be my recommended places to start - The Colour of Magic and The Light Fantastic are the first written, but are noticeably rougher than the later books.
Also, the humour is very dark and British a lot of the time, but I found Robert Rankin hilarious. It's mostly kind of near future/alternate past weird fiction that often deals in apocalypses and moleskine. The (increasingly inaccurately named) Brentford Trilogy starts with The Antipope and is probably my favourite of his very loosely bound series.