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 is error ora-12154: tns:could not resolve the connect identifier specified?
Explain the purpose of %type and %rowtype data types?
is mysql query is case sensitive? : Sql dba
What is sql constant?
What are the different types of functions in sql?
How do I save a stored procedure?
What are basic techniques of indexing?
Explain polymorphism in pl/sql.
Is a foreign key always unique?
What are the main features of cursor?
What is having clause in sql?
Can function return multiple values in sql?
What is oracle pl sql developer?
What is a sql instance vs database?
What is posting?