|
-
May 6th, 2005, 02:11 PM
#1
Select unique latest record from sql database
I have a log table like this:
username productID purchasetime
---------------------------------------------------
user1 12 01/02/1999
user1 12 03/05/2000
user2 23 02/03/2000
user2 31 02/04/2000
user2 23 02/04/2000
....
I want to select users that purchased product later than a predefined time, say 01/01/1998, but if a user purchase a same product at different dates, then only the latest one will be selected. How to write the query? Thanks a lot.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|