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 sqlcontext?
Why do we use joins?
What is a call statement? Explain with an example.
How many types of cursors supported in pl/sql?
What is pl sql collection?
What do you understand by pl/sql records?
How do I debug a stored procedure?
What is break?
What is scope of pl sql developer in future?
What is a string data type in sql?
how to rename an existing table in mysql? : Sql dba
What is the largest value that can be stored in a byte data field?
Is mariadb nosql?
How do you bind variables in pl sql?
How do I truncate a word?