Subject Re: [firebird-support] SUM(DC.I) / SUM(DC.Q) vs SUM(DC.I / DC.Q) why result is different?
Author Luigi Siciliano
Hallo,

Il 29/02/2016 15.31, Dimitry Sibiryakov sd@...
[firebird-support] ha scritto:
> 29.02.2016 15:19, Luigi Siciliano luigisic@... [firebird-support] wrote:
>> What is the difference from "SUM(DC.I) / SUM(DC.Q)"
>> and "SUM(DC.I / DC.Q)"
> 1/2 + 1/4 <> 2/6.
????

I not understand,

I have this table (DC):

A_ID I Q
1 370 1
2 370 1

sum(DC.I) is = 740
and sum(DC.Q) is = 2
then 740/2 = 370

but
SUM(DC.I / DC.Q) it should be (740 / 2) = 370. Why not?

Why i am wrong?

Thanks
--
<pre>
Luigi Siciliano
--------------------------
</pre>
--
<pre>
Luigi Siciliano
--------------------------
</pre>