MAX Query

pony08

Registered User.
Local time
Yesterday, 21:37
Joined
Jun 17, 2013
Messages
15
I am looking for a query that will single out a SKU with the maximum number of sales. I have a table that shows a SKU's material code, sales and SKU number. What I need the query to do is find the MAX sales, (1831 in the below instance) and return only the line with 0CXX2005300CP.


Material Code / Sales / SKU
0CXX20053000P / 0 / 00CXX20053
0CXX2005300CP / 1831 / 00CXX20053
0CXX2005300BT / 580 / 00CXX20053
 
Last edited:
Try this:

Code:
SELECT *
FROM tblSKU
WHERE (((tblSKU.Sales)=DMax("[Sales]","tblSKU")));

This will return 1 or more rows depending on any ties.
 
Thanks....I will give it a test drive!
 

Users who are viewing this thread

Back
Top Bottom