I don't really know which of my games held the longest, but I know that my F-Zero cartridge can't hold a save for more than a week ever since I got it at SNES launch time in Europe. Fine with me, there's nothing to unlock anyway and this means I've got the opportunity getting best time records everytime I fire up the game. I compare this cart to an incontinent old man. Or rather Alzheimer's disease.
Pokémon Gold held its save for about 15 years before finally losing it. Ah well, there went my dozen of level 100 Pokémon, all trained, no rarecandies.