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 / ankur maheshwari
select abs(sum(c1.amounts)-sum(d1.amounts)) 'Amount
difference' from account c1, account d1 where
c1.accounts='c' and d1.accounts='d'
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What are tables and fields in the database?
How to Declare Fixed Length String Value In PL SQL
What is db journal file?
How many types of tables are there?
What is the difference between the implicit and explicit cursors?
what is offset-fetch filter in tsql? : Transact sql
What is dynamic sql in pl sql?
What is primary key and foreign key with example?
List the different type of joins?
Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?
How many joins can you have in sql?
What are the types of views in sql?
What is pl sql variable?
Why do we need cursors in pl sql?
Why do we need pl sql?