The longest running D&D campaign I have participated in was probably our high school campaign run by Mike. It lasted almost 2 years. The longest running gaming group I played D&D with was the same high school group as mentioned above. We played together a little over two years.
If we are talking about games other than D&D, it's a close call. The longest running campaign I have participated in was either Robert's first edition Warhammer Fantasy campaign or Art's Amber game. They both lasted about 4 years real time. Robert's Traveller game also lasted that long, but I joined it after it had been running for about a year.
Answering the second part of the question is a bit harder. When does a group quit being the same group? When I started college, none of my high school gaming friends came with me. I got involved with a new group by simply walking up to a guy I didn't know because he had a Player's Handbook under his arm. That group lasted a year, then our DM left to do an internship. Part of that group joined up with a few other people and started playing. A couple of my high school group then started or transferred to the same college and they started playing with us as well. I suppose that is either 3 or 4 groups, though some of the groups shared members. none lasted much more than 2 years.
After college, there were a few of us who still lived close enough together that we could continue gaming together. There are 3 of us who still meet regularly, 1 who comes occasionally, and 1, (who I have been gaming with since high school), who shows up when the stars are right. We have been gaming together for about 28 years, longer for some of us. Along with the remains of my wife's college gaming group, which consists of 3 people as well, and one other occasional person, our current group of regulars have been gaming together for over 18 years.