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 two statement types in sql?
How do you run a query?
What is oracle sql developer?
How many types of index are there?
What are the different dml commands in sql?
How many types of normalization are there?
How to use boolean type in select statement?
what is uncommittable transactions? : Transact sql
What is dialect in sql?
What does pragma mean?
Name the operator which is used in the query for pattern matching?
how can we find the number of rows in a table using mysql? : Sql dba
How does pl sql work?
What does pl sql stand for?
Explain the commit statement.