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.
Answers were Sorted based on User's Feedback
Answer / 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 |
Is oracle sql free?
I need a exceptoin in pl/sql block so that if any errors occur in the block then no exception should errors should raise?
how to use regular expression in pattern match conditions? : Sql dba
What are triggers in sql?
what is the difference between char and varchar data types? : Sql dba
what are the advantages of package?
How to copy a table in another table with datas?
how to write date and time literals? : Sql dba
Explain two easy sql optimizations.
What type of database is sql?
Can two tables have same primary key?
Explain the components of sql?