Whenever you use the Max() function on a column while accessing other
columns at the same time you need a GROUP BY statement so that the MAX()
function knows how to "group" it's results.
I suggest you look into the manual for this. In fact it has a tutorial
showing you options on how to do exactly
> I had a problem that required a proper sort of the following:
>
> IT66
> ITD38
.
.
.
.
> ITD100
> ITD101
> ITD102
> ITD103
> ITD104
> ITD105
>
>
> Because of the different lengths, this was a nightmare for "order by" and so
> it led me to my first experiments with case
> and I go the followin