All,

This should be easy, but this non SQL guru can't figure it out...

Given a table T like this:

 A     B
---------
 1     5
 2     5
 3     5

I need a query to give me just the row with the largest A value, within
a group defined by B.  In this case, it would be the row with A = 3.
Something like:

SELECT * FROM T
GROUP BY B
ORDER BY A;

It doesn't seem to matter if I use ASC or DESC for the ordering, it
always gives me the row with A = 1.

Any ideas?

Thanks,
Tim McDaniel

Reply via email to