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
Is sql a backend?
What is materialized view. What are different methods of refresh?
What is trigger and stored procedure in sql?
What are the query optimization techniques?
What are all the common sql functions?
How do I save a sql query?
define data blocks ? : Sql dba
What is null in pl/sql?
What are all ddl commands?
What is pl sql architecture?
What is sql entity?
What is the difference between execution of triggers and stored procedures?
Explain the purpose of %type and %rowtype data types?
what is a scheduled jobs or what is a scheduled tasks? : Sql dba
How do I remove all records from a table?