Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: missing information and aggregates

Re: missing information and aggregates

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Fri, 5 Sep 2003 09:46:23 -0700
Message-ID: <Wd36b.21$pP2.69@news.oracle.com>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US