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 / lalitha
SELECT ABS(SUM(DECODE(ACCOUNTS,'C',AMOUNTS))-SUM(DECODE
(ACCOUNTS,'D',AMOUNTS))) FROM TEMP
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What does the argument [or replace] do?
What are the syntax and use of the coalesce function?
What does (+) mean in sql joins?
what is the use of set statement in tsql? : Transact sql
What is a sql*loader control file?
What is scalar function?
explain primary keys and auto increment fields in mysql : sql dba
What are the basic techniques of indexing?
What is a loop in sql?
Where not exists in sql?
What is sqlite format?
Is nosql relational?
What is number function in sql?
What is rownum in sql?
How can use stored procedures in sql?