isabel2005
Registered User.
- Local time
- Today, 05:45
- Joined
- Oct 6, 2005
- Messages
- 19
Hi there,
I'd like to filter out so that the name only appear once base on LastOfDate.
Sample data in query
Customer_____Date__________Product
John_________02/02/2008_____A
John_________05/03/2007_____B
John_________03/06/2006_____A
Nick_________04/04/2006_____A
Nick_________04/04/2007_____B
James_______05/04/2008______A
So in the query, I just want to have John, Nick and James appear once with the LastOfDate.
The result should be
John_________02/02/2008_____A
Nick_________04/04/2007_____B
James_______05/04/2008______A
I included the db file which only perform LastOfDate and unique name, however since John has product A and B, it won't get rid of B.
SELECT DISTINCT query1.Name, Last(query1.Date) AS LastOfDate, query1.Product
FROM query1
GROUP BY query1.Name, query1.Product;
I just want one Name, LastOfDate and one product, regardless of A or B.
Thanks,
Isabel
I'd like to filter out so that the name only appear once base on LastOfDate.
Sample data in query
Customer_____Date__________Product
John_________02/02/2008_____A
John_________05/03/2007_____B
John_________03/06/2006_____A
Nick_________04/04/2006_____A
Nick_________04/04/2007_____B
James_______05/04/2008______A
So in the query, I just want to have John, Nick and James appear once with the LastOfDate.
The result should be
John_________02/02/2008_____A
Nick_________04/04/2007_____B
James_______05/04/2008______A
I included the db file which only perform LastOfDate and unique name, however since John has product A and B, it won't get rid of B.
SELECT DISTINCT query1.Name, Last(query1.Date) AS LastOfDate, query1.Product
FROM query1
GROUP BY query1.Name, query1.Product;
I just want one Name, LastOfDate and one product, regardless of A or B.
Thanks,
Isabel
Attachments
Last edited: