| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: missing information and aggregates
"Bob Badour" <bbadour_at_golden.net> wrote in message
news:8rR5b.528$0o6.49213552_at_mantis.golden.net...
> "Christopher Browne" <cbbrowne_at_acm.org> wrote in message
> > The right Default Value for addition aggregates would be 0.
> >
> > The right Default Value for multiplicative aggregates would be 1.
>
> I think you are confusing default values with identity elements. 0 is the
> identity element for addition and 1 is the identity element for
> multiplication.
Identity elements are default values! It is obvious that aggregates should return non-null value at least in cases like these:
select sum(sal) from emp where 1=0
the correct result is 0, not the NULL (SQL standard?)
select multiply(sal) from emp where 1=0
the correct result is 1, not the NULL
select max(sal) from emp where 1=0
the correct result is minus infinity, not the NULL Received on Fri Sep 05 2003 - 11:46:23 CDT
![]() |
![]() |