Easy/Quick Way to get max value of a field in query of a table
Posted on 2010-04-06
Is there a quick way to get the maximum value from a field/column in a table. For example, I have a table with several records for each AccountID. I'm trying to capture the most recent date for every account. I'm then comparing that to each individual record to see if it is equal. If it is, then I include the account name. If not, I leave it blank. This way, the query reads easier. ie. the account name is not repeated for each record. I've done this by creating a separate query that groups by ID and has a field for the max date value, which I then compare against this table. I was just wondering if I could avoid the extra step.