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
How to get list of all tables from a database?
What is the difference between microsoft access and sql?
What is constant in pl sql?
What are the dml statements?
what is the command line end user interface - mysql? : Sql dba
describe transaction-safe table types in mysql : sql dba
What is the difference between partitioning and sharding?
What is data control language (dcl)?
What is oracle and pl sql?
What is meant by temporal data?
how to escape special characters in sql statements? : Sql dba
What is before trigger?
How do I view a table in sql?
What is a pdo connection?
What is rank function in sql?