This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Here is one simple query in which i got result what i want but how to use to display,
select emp_dept,sum(sal)"salary",sum(bonus)"bonus" from employee group by emp_dept order by emp_dept compute sum(sum(sal)),sum(sum(bonus))
it gives the total of all salary of departmentwise but it gives error when i used sum(sum(sal))"tot_sal" like this and i want to use the some name for total sal and bonus, is possible in sql server command. Any helpping solution is appreciated.