Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hi, I need to display the sum of the averages of different colums all in one colum (just one big addition) how would i go about in doing this?example: Select Name, (AVG(waterbills)+ AVG(gasbills)+AVG(electricitybills)) As MoneySpent
X002548
Not Just a Number
15586 Posts
Posted - 2010-11-16 : 08:44:57
Not sure what you mean...maybe supply ssosme sample data and expected results???
Select [Name], AVG(waterbills)+ AVG(gasbills)+AVG(electricitybills) As MoneySpentFROM TABLE GROUP BY [Name]