Scott, is it as easy as SELECT DISTINCT?

SELECT DISTINCT u.username
FROM user u, transactions t
WHERE u.userid = t.userid
AND t.status = 'wells'

Dan


Scott Haneda wrote:
Mysql 4.x

I have a one to many case, key is `id`, in this case, I have tables users
and transactions.

A user can have 1 to x transactions, each transaction has a status to it as
well.  I want to be able to get users where there is a transaction status of
'wells', however, there can be more than one of those transactions, all I
care is that it exists and I just want one unique user record back.

Ie: if I have 100 users, and each user has 2 transactions of type 'wells', I
want to select those, but a regular join will send me back 200 records,
where I want only 100

Can someone point me in the direction of the correct join to make this
happen.

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

Reply via email to