Help, not sure how to do this...

mitchem1

Registered User.
Local time
Yesterday, 21:27
Joined
Feb 21, 2002
Messages
153
Not sure how to run this query. I have two columns, Year and ReferenceNumber. I want to retrieve the maximum value in ReferenceNumber for the maximum Year. In other words, if the values in my rows are:
Year ReferenceNumber
1999 110A
1999 115A
2000 112A
2001 110A
2002 107A
2002 109A

I want to retrieve 2002 and 109A. I know how to get the max values in each column, but not the max in column b for the max in column a. Hope I didn't confuse. Thanks.
 
What about two queries...
The first one, with the table(s) you already use, gives you all the records for the max of years.
The second one, with the previous query, gives you the record for the max of references.
Newman
 

Users who are viewing this thread

Back
Top Bottom