Subject | RE: [ib-support] Sum, Union and Count |
---|---|
Author | Wilson, Fred |
Post date | 2002-08-08T20:06:50Z |
Oppps, I may have mis-read your intent. If you want the sum of the number of
rows, then the below is the correct way. If you want the sum of the columns
called "Total", then my original post will do it.
Best regards,
Fred Wilson
SE, Bell & Howell
fred.wilson@...
-----Original Message-----
From: Thomas Steinmaurer [mailto:ts@...]
Sent: Thursday, August 08, 2002 1:01 PM
To: ib-support@yahoogroups.com
Subject: RE: [ib-support] Sum, Union and Count
select count(*) as total from clients
where (clientes.id=10) OR (clientes.id=11)
HTH,
Thomas Steinmaurer
IB LogManager 2.0 - The Logging/Auditing Tool for InterBase and Firebird
http://www.iblogmanager.com
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
rows, then the below is the correct way. If you want the sum of the columns
called "Total", then my original post will do it.
Best regards,
Fred Wilson
SE, Bell & Howell
fred.wilson@...
-----Original Message-----
From: Thomas Steinmaurer [mailto:ts@...]
Sent: Thursday, August 08, 2002 1:01 PM
To: ib-support@yahoogroups.com
Subject: RE: [ib-support] Sum, Union and Count
select count(*) as total from clients
where (clientes.id=10) OR (clientes.id=11)
HTH,
Thomas Steinmaurer
IB LogManager 2.0 - The Logging/Auditing Tool for InterBase and Firebird
http://www.iblogmanager.com
> -----Original Message-----To unsubscribe from this group, send an email to:
> From: news@... [mailto:news@...]On Behalf Of Luis
> Sent: Thursday, August 08, 2002 9:59 PM
> To: ib-support@yahoogroups.com
> Subject: [ib-support] Sum, Union and Count
>
>
> How to do this:
>
> Select count(*) Total from clients where clientes.id=10
> Union
> Select count(*) Total from clients where clientes.id=11
>
> It will return
>
> Total
> -----
> 300
> 200
>
> Want to return
> Total
> -----
> 500
>
> Thanks
>
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/