Very confused with query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 transaction;

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

Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux