Do not rely on the undocumented MySQL group max feature.