i have a table test1 (a int)
there are following values:
now i want select the sum of the column a, i do:
select sum(case when a is null then 0 end) from test1
should be 10 ..but it doesnt run how i specified. i want that the null is ignored. how do i do that?
also i want calculate the average of the table above. there are 4 times a value set, (1+2+3+4) / 4 = 2.5
thx a lot