Can somebody come up with a realistic scenario where they would actually want SUM() to return NULL instead of 0? NULL is such a profoundly broken return value for sum() in my mind that I'm thinking of ignoring the standard and just coding SQLite to do the Right Thing. But I am open to the possibility that there are some cases outside of my imagination where returning zero might be considered "wrong".
If nobody can suggest a scenario where SUM() returning NULL is actually helpful, then I will likely return SQLite to its former mode of operation which is to have SUM() return 0 when it has no input. -- D. Richard Hipp <[EMAIL PROTECTED]>