Filter table by name with the latest price (1 Viewer)

Sogood

Registered User.
Local time
Today, 17:26
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 ?
 

dallr

AWF VIP
Local time
Today, 02:26
Joined
Feb 20, 2008
Messages
81
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:

Sogood

Registered User.
Local time
Today, 17:26
Joined
Apr 10, 2008
Messages
12
thanks ~ it works
 

Users who are viewing this thread

Top Bottom