Hi, Andreas, Thanks for the feedback. What I interpret MySQL is doing is that it is silently dropping the null values in the results. Internally, I presume MySQL is actually counting the row with null value in the result set, it only exclude the null value when computing the average. FastBit does something slightly different, it exclude the null values from the result set. In your MySQL example, if COUNT(*) returns 1, it would indicate MySQL is doing the same thing as FastBit. Guess we have some work to do to make FastBit conform to the SQL standard in this regard.
John On 1/12/2010 11:05 AM, Andreas Streichardt wrote: > >> SELECT AVG(a),COUNT(a) FROM test; >> +--------+----------+ >> >> | AVG(a) | COUNT(a) | >> >> +--------+----------+ >> >> | 2.0000 | 1 | >> >> +--------+----------+ >> >> This is more or less the same you just did in fastbit. > > And this is what i really meant ;): > > mysql> SELECT AVG(a),COUNT(*) FROM test; > +--------+----------+ > | AVG(a) | COUNT(*) | > +--------+----------+ > | 2.0000 | 2 | > +--------+----------+ > > >> >> SELECT AVG(a),COUNT(a) FROM test; >> +--------+----------+ >> >> | AVG(a) | COUNT(a) | >> >> +--------+----------+ >> >> | 2.0000 | 1 | >> >> +--------+----------+ >> >> This is of course a bit different as COUNT on a specific column doesn't >> count the NULLs of this column. >> > > _______________________________________________ > FastBit-users mailing list > [email protected] > https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users _______________________________________________ FastBit-users mailing list [email protected] https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
