list maximums

xxyy

Registered User.
Local time
Today, 23:22
Joined
Feb 24, 2006
Messages
51
Dear All,

I'd like to ask for your precious help.

I have a table of the following fields & tructure (simplified):

part number; date; qty;
A 01 5
A 06 12
B 03 3
B 08 29
...

My aim is to get a list of maximum qty for each part number.

Thanks in advance.

xxyy
 
Try with a query;

SELECT TableName.PartNumber, Max(TableName.qty) AS MaxOfqty
FROM TableName
GROUP BY TableName.PartNumber;
 
Thanks for your reply.

I created the query, but something doesn't want to work.
(I can get the result I want as pivot table but if possible I'd like create query for it).

My test database is attached. Please check it.

thx

xxyy
 

Attachments

Change your QUERY to :
SELECT TABLE.PN, Max(TABLE.qty) AS maxofqty
FROM

GROUP BY TABLE.PN;
 
xxyy compare my example (or Rak's example) with yours.
 
MStef & rak, thank you!

It works.

MStef,

Sorry, you're right. I didn't follow properly your instrucions.

BR

xxyy
 

Users who are viewing this thread

Back
Top Bottom