Subject Re: SQL Query Help - more
Author Adam
> First THANKS Adam & Ryan:
>
> It works if table has only those 2 fields,
> but the table has more columns: PrID, Description, Unit, Qty, Price,
> SaleDate.
> So, Im interested in obtain the complete 'LAST' row of every sold
product.
>
> Again, thanks in advance, my best 4 U,
>
> Erik

Erik,

Just include all of the fields that are not aggregates (eg max) in the
group by.

---

select PrID, Description, Unit, Qty, Price, max(SaleDate) as LastSaledate
from WhateverYourTableIsCalled
group by PrID, Description, Unit, Qty, Price

---

You can also use an order by clause after the group by to order the
results a particular way.

Adam