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
tell me about various levels of constraint. : Sql dba
What is an escape character in sql?
How do you add a column to a table?
What is cartesian join in sql?
Can we insert data into view?
Which join is like inner join?
How do I filter in sql profiler?
what is the different between now() and current_date()? : Sql dba
what is try_catch block in procedure
What are procedures used for?
Is it possible to link two groups inside a cross products after the cross products group has been created?
How many types of triggers are there in pl sql?
What is attribute indicator in pl sql?
How do you update f as m and m as f from the below table testtable?
What is use of trigger?