This gives the count per job which is always 1.  I'm using the 'having'
clause which requires the 'status' field in the select list.  This makes
it difficult to get a total.  I'll play with the 'where' clause example
to see if that works.

Thanks again!

-----Original Message-----
From: Bruce Feist [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 28, 2003 7:42 PM
To: Richard Bolen
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Select with join query question


Richard Bolen wrote:

>This works!  I was then wondering how to get the total number of all 
>jobs that this condition is true for?
>
Just include count(distinct j.jobid) in the SELECT list.

Bruce

>>select j.*
>>FROM Jobs j LEFT JOIN Submissions s ON j.jobid = s.jobid GROUP BY /*
>>all selected columns */ HAVING min(abs(s.status - 1)) > 0
>>




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

Reply via email to