Re: Multiple SQL queries...?

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

 



Not tested... how about something like this?

SELECT t1.email, t2.count(*)
FROM $table t1
LEFT JOIN $table t2 ON (t1.email = t2.email and t2.viewed = '1')
GROUP BY EMAIL


> Nope...
> HHmmm, this is really getting to me...
> I can do distinct, I can count, but I can't combine the two?
> Can't be that hard ;-)

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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

  Powered by Linux