I'm not requiring the episode to be strictly intended as comedy, but I am requiring that it be intentionally funny. That is, not trying to be serious but unintentionally funny.
TNG episodes that are intended as comedy:
The Outrageous Okana
Up The Long Ladder
Fistful of Datas
A Matter Of Time
A lot of their attempts at humor failed, of course, but I really like The Royale and QPid, and Data's Day and Matter of Time are good episodes.
Their attempts at humor are often better in episodes that aren't intended as humor, such as the ending of Menage a Troi.