Re: [GENERAL] sum() - unexpected results.

2001-02-05 Thread Tod McQuillin
On Mon, 5 Feb 2001, Jeff MacDonald wrote: > I got some unexpected results from a sum().. just wondering > if it's a bug of any sort, or if i just should have been expecting it.. > > SELECT sum(foo) FROM mytable WHERE active = 1; > > Now lets say that no rows are active = 1, then this query return

Re: [GENERAL] sum() - unexpected results.

2001-02-05 Thread Tom Lane
Jeff MacDonald <[EMAIL PROTECTED]> writes: > I got some unexpected results from a sum().. just wondering > if it's a bug of any sort, or if i just should have been expecting it.. > SELECT sum(foo) FROM mytable WHERE active = 1; > Now lets say that no rows are active = 1, then this query returns >