Star Trek: The Next Generation [TNG] - Déjà Q Season 3 Episode 13
Stardate 43539.1 The Enterprise moves in to assist Bre'el IV, as their planet's satellite's orbit has decayed exponentially, sending it on a collision course with the planet. Just as the Enterprise begins the operation to attempt to move the satellite away from the planet, an intense ringing is heard throughout the ship. It is just then that a very undignified Q makes another appearance aboard Picard's ship.