hi guys, AVE is only for columns? can i use this in rows? if i have this sample how can i have the sql server calculate this:
average of rows with null
id col1 col2 col3 col4
1 1 2 3 4
2 null 1 7 7
3 1 null null 9
4 3 2 1 6
to this?
for id=1:
(1+2+3+4)/4
for id=2:
(1+7+7)/3
for id=3:
(1+9)/2
for id=4:
(3+2+1+6)/4
thanks for any inputs
average of rows with null
id col1 col2 col3 col4
1 1 2 3 4
2 null 1 7 7
3 1 null null 9
4 3 2 1 6
to this?
for id=1:
(1+2+3+4)/4
for id=2:
(1+7+7)/3
for id=3:
(1+9)/2
for id=4:
(3+2+1+6)/4
thanks for any inputs