Errors considered harmful

SQL also gets it wrong with NULLs.
Consider a table with these values:

   A     B
   0     1
   1     null

then sum(A) + sum(B) = 2 but sum(A+B) = 1.

(And I have more examples of other problems with SQL’s null.)

For those who want to try this out (I used sqlite):

create table t(a int, b int);
insert into t(a,b) values(0,1);
insert into t(a,b) values(1,null);
select sum(a)+sum(b), sum(a+b) from t;