i have one table with accounts and amounts as
colums.accounts with columns c and d. and amounts with
values 1000,2000,3000 for c and 4000,5000,8000 for d.i need
to find the sum of these accounts c and d individually
and find the differences between their sum using one select
statement.
Answer Posted / sandeep
I hope this will be helpful.
SELECT sum(Account) as "Account Sum", sum(Amount) as "Amount
Sum", sum(Amount)-sum(Account) as "Difference" FROM account
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Does truncate require commit?
How do you write a subquery?
What is partition by in sql?
What is the main reason behind using an index?
explain advantages of innodb over myisam. : Sql dba
Why is stored procedure faster than query?
What is sqlcommand?
What are tables and fields in the database?
How do you truncate?
What is the need of merge statement?
Is it possible to create startup or shutdown trigger for on-schema?
How to create a menu in sqlplus or pl/sql?
What is sql exception?
What are the possible values for the boolean data field?
What do you mean by dbms? What are its different types?