Last records from a Group By query

  • Thread starter KevinE via AccessMonster.com
  • Start date
K

KevinE via AccessMonster.com

I would like to write a query to find the last (most recent date) records
only from two different fields. No problems using MAX in the ‘Date’ field,
the problem being with the ‘Player’ field. I’ve tried using LAST but it seems
to throw up incorrect results.

thanks,
Kevin

SELECT tblMain.Team, Last(tblMain.Player) AS LastOfPlayer, Max(tblMain.Date)
AS MaxOfDate
FROM tblMain RIGHT JOIN tblCurrent ON tblMain.Team = tblCurrent.Team
GROUP BY tblMain.Team, tblCurrent.ID
ORDER BY tblCurrent.ID;
 

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