select avg((col1+col2+col3)/3) from Test where id=1
But i have one question? what mean avg in sql . I was checked avg and sum.Its threw same answer.So y we want avg .the avg mean average so my first query will be return correct value.but thats not give correct answer .it is sql server problem thats
not my problem... So Why that symbol(avg) use for sql .thats not use.
RameshRajend...
Star
7983 Points
2099 Posts
Re: SUM and AVERAGE
Dec 14, 2012 03:56 PM|LINK
I am Really sorry
My answer was wrong. below is correct.
select avg((col1+col2+col3)/3) from Test where id=1
But i have one question? what mean avg in sql . I was checked avg and sum.Its threw same answer.So y we want avg .the avg mean average so my first query will be return correct value.but thats not give correct answer .it is sql server problem thats not my problem... So Why that symbol(avg) use for sql .thats not use.
Any way thanks for yoour info pa.....