Very confused with query
| From: | Sparky Kopetzky | Date: | Sat, 05 Jul 2003 16:19:39 +0000 |
| Subject: | Very confused with query | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29091@lists.php.net to get a copy of this 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 transaction;
Could some kind soul help me figure this one out??
Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net