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 / anuj shukla
Hi all,
question simply ask for the total of both the columns and
their difference, all in one 'select' statement.
select sum(c)"Sum of C",sum(d)"Sum Of
D",abs(sum(c)-sum(d))"Difference" from accountA
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Which join condition can be specified using on clause?
Which normal form is best?
What is sql catalog?
What are the string functions in sql?
What is %type in sql?
What is the use of sqlerrd 3?
How many commands are there in sql?
What makes a good primary key?
What are sql objects?
what is the difference between char_length and length? : Sql dba
Why use subqueries instead of joins?
Can variables be used in sql statements?
What is sql key?
What is query execution plan in sql?
What does where 1/2 mean in sql?