Yes, the NULL as it is returned by SUM means "No data to answer your question".
I was talking in context with the example of the fictional sales situation, rather than the technical description of what SUM() exactly does, because, as I see it, we're trying to figure out whether the technical description/implementation makes sense. If that query returned 0 (as SQLite currently does), rather than NULL (as the standard specifies), it would not allow me to figure out whether I sold $0 worth of items or if I didn't sell anything at all. -----Original Message----- From: Puneet Kishor [mailto:[EMAIL PROTECTED] Sent: Thursday, September 08, 2005 6:50 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] SUM and NULL values On Sep 8, 2005, at 5:45 PM, Marcus Welz wrote: > If "SELECT SUM(amt)" means "How much did I sell?" > > Then the "NULL" should mean, "You didn't sell anything.", no? > no... NULL means, "I don't have any data to answer that question" which is very different from "I sold $0 worth of things" or "I didn't sell anything." -- Puneet Kishor