Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> comp.databases.theory -> Re: All hail Neo!
David Cressey wrote:
> "Marshall Spight" <marshall.spight_at_gmail.com> wrote in message
> >
> > I just fired up Excel 2003. I entered two columns of numbers, and
> > left one cell empty in each column. Then I set the formula for the
> > third column to be col1 + col2. Then I got the sum of the first two
> > column. It behaved exactly as I propose: missing values were
> > ignored, both on the vertical sum and on the horizontal sum.
> > This preserves the SUM(A) + SUM(B) = SUM(A+B) property
> > as well.
>
> Repeat the experiment with avg. The results are even more interesting than
> sum.
I was thinking about this just before you suggested it, and it occurred to me that the average of an empty set should produce the same result as a divide by zero. Sure enough, if you ask excel what the average of three empty cells is, it says "#DIV/0!".
Using average in the grid does *not* have the property (AVG(A) + AVG(B)) / 2 = AVG(A+B). That property won't hold unless A and B have the same cardinality, which they won't (necessarily) if A or B is allowed to be empty. We can generalize this to say that a fold of a fold won't necessarily return the same results as a flattened fold.
Marshall Received on Wed Apr 26 2006 - 15:30:16 CDT