Subject | RE: [ib-support] Sum, Union and Count |
---|---|
Author | Wilson, Fred |
Post date | 2002-08-08T20:05Z |
Mmmm, "select count(*)" returns the number of rows, not a sum.
Maybe something like:
Select sum(Total) from clients where clients.id = 10 or clients.id = 11
Best regards,
Fred Wilson
SE, Bell & Howell
fred.wilson@...
-----Original Message-----
From: Luis [mailto:las_@...]
Sent: Thursday, August 08, 2002 12: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/
Maybe something like:
Select sum(Total) from clients where clients.id = 10 or clients.id = 11
Best regards,
Fred Wilson
SE, Bell & Howell
fred.wilson@...
-----Original Message-----
From: Luis [mailto:las_@...]
Sent: Thursday, August 08, 2002 12: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/