Filter table by name with the latest price

Sogood

Registered User.
Local time
Tomorrow, 04:28
Joined
Apr 10, 2008
Messages
12
how can i filter a table "date , item name , price"

by only show an item name per line with latest price ?
 
Try:
Code:
SELECT T1.*
FROM YourTable T1 INNER JOIN 
   (SELECT Max([Date]) As MaxDate, Item FROM YourTable GROUP BY Item) T2. 
  ON (T1.Item = T2.Item AND T1.Date = T2.MaxDate)

PS: Please note that the word date is a reserved word in Access

Dane
 
Last edited:
thanks ~ it works
 

Users who are viewing this thread

Back
Top Bottom