Well, let me explain :)
My problem originates from a chart generator which needs all data to be explicitly set - including "none" values. Think of this simple example: 2001|B|123 2002|C|234 How would you GROUP and COMPARE A and B in a bar chart? Two columns in each category... 2001: B=123, C=0 2002: B=0, C=234 Either you make the SQL query return those empty parts or you perform these extra check afterwards. You effectively helped me with the first approach :) Regarding NULL values I tend to avoid them at all costs. NULL values make NATURAL JOINs "fail", which increases the chances of doing mistakes. > Date: Sat, 25 Sep 2010 02:47:05 +0200 > From: oliver....@web.de > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Need help with self-join (I think) > > Am 25.09.2010 01:47, schrieb Kristoffer Danielsson: > > [...] > > > > > Because, given a certain algorithm, generating statistics will become a lot > > easier if each value combination is represented in the returned row set. > > > > really? NULL means there are no values present or there are unknown > values - statistics with NULL should be without consequences > > if you think you should calculate instead of NULL with 0 (the number) it > still isn't correct (try it with an average, ie sales figures: you > assume that NULL = 0 but that assumption is a mistake) > > > [...] > > Oliver > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users