Code:
max[$1] = !($1 in max) ? $2 : ($2 > max[$1]) ? $2 : max[$1]
max[$1] - 'max' is an array indexed by the value of the FIRST field
!($1 in max) ? $2 - if '$1' is NOT already in array 'max', return the value of the SECOND field
: - otherwise
(
$2 > max[$1]) ?
$2 :
max[$1]
if the value of the SECOND field is greater than what's already in array 'max' (index by '$1'),
return the value of the SECOND field.
If not, return the current value of array 'max[$1]'.
'max[$1] =' - whatever gets returned, store it array 'max' index by the FIRST field.
Lil' bit wordy, but I hope you get the gist of it.