The max and GROUP BY do not make sense.