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 is a tablespace? : Sql dba
What are some emotional triggers?
what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba
What do you understand by exception handling in pl/sql?
How to fetch alternate records from a table?
How to assign sql query results to pl sql variables?
What is delimiter in pl sql?
What is the least restrictive isolation level? : Transact sql
What are types of exception?
What are tables in sql?
What type of join is sql join?
Define SQL and state the differences between SQL and other conventional programming Languages?
Differentiate between sga and pga.
Is it possible to create startup or shutdown trigger for on-schema?
Define tables and fields in a database