Hi,
I have a temporary table temp1 which has these records.
err sev descr freq
---- --- ----- ----
16001 1 Session Number was not passed 155
16001 1 Session Number was not passed 244
16001 1 Session Number was not passed 283
I want to calculate the average of the freq column for all the err ids in the table.
I 've used the this query.
select err, sev, descr,avg(freq)
from #temp1
group by err,sev,descr,freq
order by err
After I run this query I get this result set which is not what i want.
16001 1 Session Number was not passed 155
16001 1 Session Number was not passed 244
16001 1 Session Number was not passed 283
Please advise on how to calculate the average of the freq column.
Many thanks in advance.
I have a temporary table temp1 which has these records.
err sev descr freq
---- --- ----- ----
16001 1 Session Number was not passed 155
16001 1 Session Number was not passed 244
16001 1 Session Number was not passed 283
I want to calculate the average of the freq column for all the err ids in the table.
I 've used the this query.
select err, sev, descr,avg(freq)
from #temp1
group by err,sev,descr,freq
order by err
After I run this query I get this result set which is not what i want.
16001 1 Session Number was not passed 155
16001 1 Session Number was not passed 244
16001 1 Session Number was not passed 283
Please advise on how to calculate the average of the freq column.
Many thanks in advance.