SELECT max([commessa]) AS comme, [codice], [note]
FROM tabella1
GROUP BY [codice];