>
>select R.* from Ratings R INNER JOIN (select Account, max(mRating) as MaxRatingForAccount from Ratings GROUP BY Account) Mx
>ON R.Account = Mx.Account and R.mRating = Mx.MaxRatingForAccount
>
>
>there's some stuff in here that I haven't used before, like R.* and INNER JOIN and also Mx ON R. etc.,
>so it's a little bit hard for me to debug it. Thanks. Steve
R and Mx are aliases for the Ratings table and the derived table respectfully.
I think you may need to read a bit about basic SQL features, you may start from these links
http://www.w3schools.com/sql/default.asp
If it's not broken, fix it until it is.
My Blog