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 are the differences between char and nchar? : Sql dba
How much does a sql dba make? : SQL DBA
Can you call pl/sql package functions from within a fast formula?
What is the difference between clustered and non-clustered index in sql?
What is trigger price?
What are the ways on commenting in a pl/sql code?
What is an invalid partition table?
What is gpt format?
What is coalesce in sql?
what is the difference between myisam static and myisam dynamic? : Sql dba
What is duration in sql profiler trace?
What is procedure function?
Is hadoop a nosql?
What is coalesce sql?
What are the sql versions?