Codice PHP:
SELECT COL1MAXCOL2 
FROM tabella
GROUP BY COL1