I have a table called TRANSACTION, it has some fields :

REGDATE - date of the transaction
WHAT - a string (NOT UNIQUE)
CUSTOMER - customer code

I want to query all WHAT that the date of the transaction was 15 days before.

So, my sql query is :

SELECT WHAT FROM TRANSACTION WHERE REGDATE < Now() -INTERVAL 15 DAY

But, because of WHAT is not unique, then I could receive some duplicates (customer can 
send some
WHAT in the same REGDATE).

How can I query only the unique WHAT ? I need to list all WHAT (uniquely) that the date
transaction was 15 days before.

Please help,

Thanks



__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to