Oops...

That should, of course, be *inconsistency*.

On 2/8/06, Dennis Cote <[EMAIL PROTECTED]> wrote:
>
> [EMAIL PROTECTED] wrote:
>
> >
> >Did you try sum(a)/count(a) instead of avg(a).
> >
> >   SQLite version 3.3.3
> >   Enter ".help" for instructions
> >   sqlite> create table t (a integer, b real);
> >   sqlite> insert into t values (3, 3);
> >   sqlite> insert into t values (3, 3);
> >   sqlite> insert into t values (4, 4);
> >   sqlite> select avg(a), sum(a)/count(a) from t;
> >   3.33333333333333|3
> >
> >Kind of seems wrong, doesn't it....
> >--
> >D. Richard Hipp   <[EMAIL PROTECTED]>
> >
> >
> >
> >
> Richard,
>
> This is a good point. This is exactly the kind of consistency that the
> standard developers try hard to eliminate. It's probably one of the
> reasons the standard says the average of an integer column should be an
> integer (or words to that effect).
>
> Dennis Cote
>

Reply via email to