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 / vijay sinha
select (select sum(amount) from table_name where account = 'C') - (select sum(amount) from table_name where account = 'D')
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is a loop in sql?
How does stored procedure reduce network traffic?
Is sql a backend?
What is nvarchar in sql?
Explain the purpose of %type and %rowtype data types?
define data blocks ? : Sql dba
Is it possible to update views?
How do I remove sql plus from windows 10?
What are records give examples?
What is a recursive stored procedure?
What is the process of debugging?
Enlist some predefined exceptions?
how mysql optimizes distinct? : Sql dba
discuss about myisam index statistics collection. : Sql dba
What is a procedure in pl sql?