Sorry, I meant this:austin | 0mike | 2
jonh | null
mary | nullOn Tue, Nov 26, 2013 at 2:24 PM, Roberto Cornacchia <roberto.cornacchia@gmail.com> wrote:
Actually, I also think the sum should be 0 for austin, as the sum over an empty set is mathematically defined as 0 (http://en.wikipedia.org/wiki/Empty_sum)So this result is what I would expect:austin | 0
jonh | null
mary | null
mike | nullOn Tue, Nov 26, 2013 at 1:12 PM, Roberto Cornacchia <roberto.cornacchia@gmail.com> wrote:
Personally I believe the expected result is null in all cases except mike.3 + null is nulll, not 3, right?On Tue, Nov 26, 2013 at 1:09 PM, Pedro Salgueiro <pedro.salgueiro@cortex-intelligence.com> wrote:
_______________________________________________Hi,A few weeks ago we encountered an issue with monetdb when summing nulls, grouped by some column. We managed to create a simple test case which reproduces this scenario:create table test (number int, name varchar(50));
insert into test values(1,'jonh');
insert into test values(2,'mike');
insert into test values(3,'mary');
insert into test values(null,'austin');
insert into test values(null,'jonh');
insert into test values(null,'mary');
select name, sum(number)
from test
group by name;The result of this query is:austin | 0
jonh | 1
mary | 3
mike | 2But the expected result is:austin | null
jonh | 1
mary | 3
mike | 2The version that we are using is Feb2013-SP5.We found a bug report that could be related to this one, but we are not sure: http://bugs.monetdb.org/show_bug.cgi?id=3388Should we open a new issue for this one?Thank you,Pedro Salgueiro
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list