Show latest record according to date

G

Garak

Hi,

I'm trying to create a query that show the latest recorded according to the
date. I have a table with mix orders and I would like to create a query
sorting to Group, but only show the latest record for that group.

Any help would be greatfull.

Graeme
 
O

Ofer

One way is to create a group by query that return order Group and the latest
datre
SELECT GroupName, Max(OrderDate) AS MaxOrderDate
FROM MyTableName
GROUP BY GroupName

And then create anothe query that join the order table and the query above,
by the group Number and the date, that will return the latest order for a
group

HTH
 
Top