Max of date question

M

Mark

Hi,

There has to be a simple answer to this but I can only
find a convaluted one !

If, for example, a table storing data on product movements
has three fields, product, DateOfMovement and
destination, and i want to run a query to group by the
product, and show the last movement it made, i.e. max of
DateOfMovement, how can I get the same query to return
where that movement went to i.e. destination ? The
aggregate functions just return the last alphabetical
destination within the grouped product not necessariy the
one relating to the last movement. Have considered using
two queries and concatonating the location onto the end of
the date and maxing that but there must be an easier way ?

Can someone help me ? Thanks

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top