Thanks to all.
> -Original Message-
> From: Michael Dykman [mailto:[EMAIL PROTECTED]
> Sent: September 28, 2007 1:36 PM
> To: Beauford
> Cc: mysql@lists.mysql.com
> Subject: Re: Count syntax
>
> 1 means that 1 will be added to the sum if the condition
>
attachments. Please notify the sender immediately by reply e-mail and delete
the e-mail from your system.
-Original Message-
From: Michael Dykman [mailto:[EMAIL PROTECTED]
Sent: Friday, September 28, 2007 1:36 PM
To: Beauford
Cc: mysql@lists.mysql.com
Subject: Re: Count syntax
1 means
1 and 0 do in this -
> SUM(IF(supportertype = 'L', 1, 0))
>
> > -Original Message-
> > From: Baron Schwartz [mailto:[EMAIL PROTECTED]
> > Sent: September 28, 2007 1:00 PM
> > To: Beauford
> > Cc: mysql@lists.mysql.com
> > Subject: Re
Thanks - it works, but what does the 1 and 0 do in this -
SUM(IF(supportertype = 'L', 1, 0))
> -Original Message-
> From: Baron Schwartz [mailto:[EMAIL PROTECTED]
> Sent: September 28, 2007 1:00 PM
> To: Beauford
> Cc: mysql@lists.mysql.com
> Subject: Re: Coun
Beauford wrote:
Hi,
I have the following line of code and I keep getting wrong results from it.
Can someone let me know what I'm doing wrong here. I just can't quite figure
out the syntax that I need.
select count(*) as numrows, count(supportertype) as leadcar from registrar
where supportertype