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 the difference between char_length and length? : Sql dba
Is sql similar to python?
How much does sql certification cost?
how to get help information from the server? : Sql dba
what are the disadvantages of mysql? : Sql dba
Is crud a cuss word?
What is output spooling in sql*plus?
What do you mean by table in sql?
What is the use of partition by in sql?
Difference between truncate, delete and drop commands?
What is foreign key and example?
explain advantages of myisam over innodb? : Sql dba
Is full outer join same as cross join?
what are null values? : Sql dba
How are sql commands classified?