This one works, just change the fields...

SELECT transaction_user_id, Max(transaction_date) AS transaction_max_date, *
FROM transactions group by transaction_user_id;

This works... but I tried it on a number field instead of date... but it
should handle the same way...

Ronald Villarosa

"Sparky Kopetzky" <[EMAIL PROTECTED]> wrote in message
Good morning!!

I'm trying to select 1 and only one record from each user based on the last
date from a transaction file. This is what I'm using and it's not even
close. It seems DISTINCT does not work!!

SELECT DISCTINCT(transaction_user_id), MAX(transaction_date), * FROM

Could some kind soul help me figure this one out??

Robin E. Kopetzky
Black Mesa Computers/Internet Services

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to