Find record with maximum in one field

barbarossaii

Master of Disaster
Local time
Today, 17:53
Joined
Dec 28, 2002
Messages
70
Hi,

tried to find the records with the maximum in one field.



Got a table like this:

month…invoice…..qty
Jan……..123………55
Jan……..124………76
Jan……..125………344
Feb…….126………865
Feb…….127………744



The result of a (simple) query should be:

month…invoice…..qty
Jan……..125………344
Feb…….126………865




Just using “max” & “group” seems not to work, because I can’t fit the “invoice” field properly in.

What query can I use ?

TIA,
Barbarossaii
 
create a query with grouping on month and max on qty. In another query add your table plus the formerly created query and join them on both fields. Then you only need to add the three fields from the table to your query.
 
Nouba-

These kind of queries drive me nuts. Have fooled-around on and off throughout the day trying to come up with the solution you so elegantly explained in two sentences.

Great response!

Bob
 

Users who are viewing this thread

Back
Top Bottom