• You have more than 3 columns.

    Have you written any code for this at all? Can you post it? What have you tried?

    As others have said, MAX and Group By will help you.