I can replicate this behaviour if I insert a zero-length string into the
column.
sqlite> create table foo(a);
sqlite> insert into foo values(5);
sqlite> insert into foo values("");
sqlite> select max(a) from foo;
sqlite> select min(a) from foo;
5
sqlite> select avg(a) from foo;
2.5
Is this a possible explanation?
On Wed, Nov 25, 2015 at 11:37 AM, Simon Slavin <slavins at bigfraud.org> wrote:
>
> On 25 Nov 2015, at 11:09am, R Smith <rsmith at rsweb.co.za> wrote:
>
> > sqlite> SELECT max(UnitCost) FROM BOMData;
> >
> > sqlite> SELECT min(UnitCost) FROM BOMData;
> > 0.0
>
> Can you please post the result of
>
> SELECT DISTINCT typeof(UnitCost) FROM BOMData;
>
> (I think that's how you do it. You might need to use GROUP BY.)
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>