| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Aggregation (with GBY) is Relational Division
Marshall wrote:
> vadimtro_at_gmail.com wrote:
[snip]
> Actually, I had kind of a jolt reading something Bob Badour
> wrote recently about defining aggregates as either a fold
> or an expression written in terms of folds. (He did not use
> the term "fold".) Thus, avg(x) can be defined as simply
> sum(x) / count(). And sum(x) can be defined as simply
> fold(x,+,0).
>
> I like that much better. For one thing, it makes it much
> easier to eliminate duplicate folds in a complex group-by.
> (It's hard to explain why, so I won't bother. It's not clear
> if this post will interest anyone anyway, the OP excepted. :-)
I am surprised that my comment would jolt you. I wonder how you would define standard deviation without reference to variance, for instance, or variance without reference to sums of squares etc. I cannot imagine anyone forsaking the normal definition of average to replace it with something that has to multiply by (i-1) before every i-th term and then divide by i after adding the term.
(I am not even sure how I would express that mathematically without using recursion.)
>>From a programming language standpoint, it raises the
I wonder what you would call arbitrary expressions defined in terms of aggregates if you did not call them aggregates. Received on Mon Jun 05 2006 - 07:07:09 CDT
![]() |
![]() |