Good afternoon,
How can I take the 3 results below add them together then divide by
131.77?
Can it all be done in one SQL statement?
Thanks in advance.
mysql describe ads;
+---+---+--+-+++
What about
SELECT (SUM( ads.col * 1.91) * ads.depth ) ) / 131.77
FROM ads
WHERE date = '2004-02-26'
AND editionID = '13'
AND ads.page = '16'
Original Message
On 2/25/04, 4:19:12 PM, Rogers, Dennis [EMAIL PROTECTED] wrote
regarding Query help - add results then divide by :
Good
: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; Hines, David
Subject: Re: Query help - add results then divide by
What about
SELECT (SUM( ads.col * 1.91) * ads.depth ) ) / 131.77
FROM ads
WHERE date = '2004-02-26'
AND editionID = '13'
AND ads.page = '16'
Original Message
On 2/25/04, 4:19:12 PM
I think that you can just do this:
select sum(ads.col)*1.191*sum(ads.depth)/131.77 where date ='2004-02-26'
AND editionID = '13' AND ads.page = '16';
because of the disttributive property of multiplication.
(2 * 1.191) +(6*1.91) +(4*1.91)/131.77 = 12 *1.91/131.77 =
(12*1.91)/131.77 =
Rogers, Dennis wrote:
Good afternoon,
How can I take the 3 results below add them together then divide by
131.77?
Can it all be done in one SQL statement?
Thanks in advance.
mysql describe ads;
+---+---+--+-+++