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
What is the difference between clustered and non-clustered indexes?
Can we commit inside a trigger?
What is sqlcontext?
Why should I use postgresql?
How many disk partitions should I have?
Why we use triggers in mysql?
Which is better cte or subquery?
what are the differences between require and include, include_once and require_once? : Sql dba
What are the 3 types of behavioral triggers?
how to get a list of all tables in a database? : Sql dba
What is compound trigger?
How do I access sql anywhere database?
What is native sql query?
What will you get by the cursor attribute sql%notfound?
Which is faster truncate or drop?